-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Description
I have been trying to deploy a react-native app to the Nox emulator.
Apparently, the emulator comes with its own adb.exe. More info about this: https://www.bignox.com/blog/how-to-connect-android-studio-with-nox-app-player-for-android-development-and-debug/
The problem is, everytime I run react-native run-android
, the cli will fail to find a device, eventhough the custom adb.exe clearly found a device before. My guess is react-native
doesn't call the right adb.exe, because everytime I run react-native run-android
, a new adb.exe process will be started. So I add a PATH to the custom adb.exe, and remove the PATH adb.exe that comes with the Android SDK. It still fails. The same thing still happens.
- Before running
react-native run-android
:
C:\Users\Jacky>adb devices
List of devices attached
127.0.0.1:62001 device
- On running
react-native run-android
:
...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: No connected devices!
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 33.883 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
- After running `react-native run-android:
C:\Users\Jacky>adb devices
adb server is out of date. killing...
* daemon started successfully *
List of devices attached
The reason that I want to use nox emulator is because the other emulators are simply too slow on my machine. I tried AVD and genymotion, both are really slow on my machine, for whatever reason. Nox though, runs very smoothly on my machine, I have even played some games on it for several months.
Can anyone help me with this? It will be really appreciated! Thanks!