I got "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:" while trying to run my app on the device. Both "react-native run-android --stacktrace" and "react-native run-android --debug" yields "error: unknown option". Any ideas?
-
You can generate a signed apk and deploy it to your phone. Have you ever tried that? facebook.github.io/react-native/docs/signed-apk-android.htmlFranzé Jr.– Franzé Jr.2016年10月14日 22:32:30 +00:00Commented Oct 14, 2016 at 22:32
4 Answers 4
As for now,
react-native run-android --help
Have only
--install-debug
in available options. Looks like this error message is outdated:
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Comments
If you already have the app with same package name in the emulator/device, uninstall the app from device/emulator and try again.
Comments
You can use this
cd android
gradlew.bat --stacktrace
Comments
React Native --stacktrace for Android
While in the root directory of your /app:
> cd android
> ./gradlew --stacktrace
or
> cd android
> ./gradlew assembleDebug --info