Nieck
Nieck

Reputation: 1646

Nox emulator with React Native

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

Answers (5)

Abdalla Suliman
Abdalla Suliman

Reputation: 21

  1. Open NoxPlayer Emulator > Go to Settings > General > Startup items > Check Root
  2. Enable debugging mode/options and USB debugging
  3. Run adb connect 127.0.0.1:62001
  4. Run adb reverse tcp:8081 tcp:8081
  5. Run npm run android
  6. Press d to open the developer menu
  7. Go to settings > Debug server host & port for devices
  8. Input the <YOUR_DEVICE_IP_NUMBER>:8081

If you are not able to open the dev menu run the step 4 command again.

Upvotes: 0

Roman Rogovets
Roman Rogovets

Reputation: 11

  1. Open terminal and type adb connect 127.0.0.1:62001. type adb devices to make sure your emulator is connected.

  2. 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.

  3. 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

  4. 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

ufxmeng
ufxmeng

Reputation: 2600

  1. Open terminal and type adb connect 127.0.0.1:62001. type adb devices to make sure your emulator is connected.

  2. 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.

  3. 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

  4. Use developer menu to reload your app,then close the app, and reopen it.

Upvotes: 11

corasphinx
corasphinx

Reputation: 63

adb connect localhost:62001
react-native run-android --deviceId localhost:62001

Upvotes: 0

Roman Rogovets
Roman Rogovets

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

Related Questions