Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Android App #161

Open
kk8401 opened this issue May 28, 2020 · 6 comments
Open

Run Android App #161

kk8401 opened this issue May 28, 2020 · 6 comments

Comments

@kk8401
Copy link

kk8401 commented May 28, 2020

Hi,

I am trying to use the hotreload for my android device (Android 9).
I have follow the instruction and setup config.xml as described in the documentation.
When the app launched on my phone it is pointing to 10.0.2.2:8888

i have tried to setup host and port at devServer pointing to my laptop but doesn't seems to work.
devServer: {
host: '192.168.1.104',
port: '8888'
},

Thanks.

@kotarella1110
Copy link
Owner

@kk8401 Hi, Is your laptop and your Android device in the same network environment (Wi-Fi)?

@kk8401
Copy link
Author

kk8401 commented May 29, 2020

yup same network.
is there anything i need to config at my wifi?

@kotarella1110
Copy link
Owner

It works correctly in my environment.
This plugin will automatically get the local IP of the machine it is running on, so basically you don't need to fix webpack config.

@Kepro
Copy link

Kepro commented Oct 15, 2020

When the app launched on my phone it is pointing to 10.0.2.2:8888

@kk8401 this IP 10.0.2.2 is your local LAN IP of your laptop or?

@peitschie
Copy link

10.0.2.2 happens to be loopback when running an Android emulator. Not entirely sure why it ends up being attempted here...

@peitschie
Copy link

Right... seems to be coming from here: https://github.com/kotarella1110/cordova-plugin-webpack/blob/master/src/webpackServe.ts#L78

For some reason, the prepareUrls is getting confused there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants