You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.
I'm working on hybrid web apps (using Nx/React/Capacitor). So far, I have a backend app serving APIs (in port 3333) and a React frontend (in port 4200) connecting to the APIs, based on which I'm generating an Android and iOS application (using a plugin for Nx called Nxtend).
I'm not able to figure out how to make the Android application running in the virtual device to connect to the backend server in my development machine. I read https://developer.android.com/studio/run/emulator-networking and some answers on this on StackOverflow and nothing seems to help.
When I access 10.0.2.2/api/todo in a browser in the virtual device, I get the result of the API, but from within the application, the API call fails. Would I need to do any additional steps to make the Android application connect with the server in the development machine? Would have an insight of what I could be missing? Thanks!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm working on hybrid web apps (using Nx/React/Capacitor). So far, I have a backend app serving APIs (in port 3333) and a React frontend (in port 4200) connecting to the APIs, based on which I'm generating an Android and iOS application (using a plugin for Nx called Nxtend).
I'm not able to figure out how to make the Android application running in the virtual device to connect to the backend server in my development machine. I read https://developer.android.com/studio/run/emulator-networking and some answers on this on StackOverflow and nothing seems to help.
When I access 10.0.2.2/api/todo in a browser in the virtual device, I get the result of the API, but from within the application, the API call fails. Would I need to do any additional steps to make the Android application connect with the server in the development machine? Would have an insight of what I could be missing? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions