Reputation: 1646
I'm setting up my development environment for React Native with a custom Android Emulator (Nox).
I followed the steps on this website: How to connect Android Studio with Nox App Player
But when I type: adb devices
it still shows nothing.
So when I try to run my app with react-native run-android
it says that there is no Android simulator running.
Is there something I missed or someone with the same problem?
Upvotes: 5
Views: 26565
Reputation: 21
adb connect 127.0.0.1:62001
adb reverse tcp:8081 tcp:8081
npm run android
If you are not able to open the dev menu run the step 4 command again.
Upvotes: 0
Reputation: 11
Open terminal and type
adb connect 127.0.0.1:62001
. typeadb devices
to make sure your emulator is connected.Go to your project, type
react-native run-android --deviceId 127.0.0.1:62001
, waiting for the project to finish compiling, and then you will see a red error screen.Open the developer menu, Go to Dev Settings → Debug server host for device, Assume your local ip is 192.168.1.121, then type:
192.168.1.121:8081
Use developer menu to reload your app,then close the app, and reopen it.
Just in step 2 type react-native run-android
(if you don't work with android >10 add prefix) --no-jetifier
. It works for me!
Upvotes: 1
Reputation: 2600
Open terminal and type adb connect 127.0.0.1:62001
. type adb devices
to make sure your emulator is connected.
Go to your project, type react-native run-android --deviceId 127.0.0.1:62001
, waiting for the project to finish compiling, and the you will see a red error screen.
Open the developer menu
, Go to Dev Settings → Debug server host for device
, Assume your local ip is 192.168.1.121
, then type: 192.168.1.121:8081
Use developer menu
to reload your app,then close the app, and reopen it.
Upvotes: 11
Reputation: 63
adb connect localhost:62001
react-native run-android --deviceId localhost:62001
Upvotes: 0
Reputation: 11
it mean for android v 4.1.1 in nox emulator adb connect 127.0.0.1:62001 for android v 5.1.1 in nox emulator adb connect 127.0.0.1:62025
Upvotes: 0