React Native cannot run stacktrace
I am trying to get a test project up and running with React Native on a Mac (osx 10.12). If I run:
react-native run-android --stacktrace
I get the following error:
error: unknown option '--stacktrace'
I have installed:
- Node Watchman
- Flow
- Java JDK
- Android SDK
- React Native CLI
- Genymotion
When I run the command the emulator is running.
Can anyone tell me why this is happening? Many thanks in advance.
The --stacktrace
suggestion isn't output by the react-native run-android
command, it comes from one of the commands it runs. Here's how to run it with the --stacktrace
option. Read further for an explanation.
cd android && ./gradlew installDebug --stacktrace
react-native run-android
actually runs cd android && ./gradlew installDebug
as you can see in the following lines outputted by react-native run-android
Running /Users/upside/Library/Android/sdk/platform-tools/adb -s 0111474880b8a726 reverse tcp:8081 tcp:8081
Building and installing the app on the device (cd android && ./gradlew installDebug)...
So, if you want to run with the --stacktrace
option, you'll need to run cd android && ./gradlew installDebug --stacktrace
Once you've figured out your problem, you should go back to using react-native run-android
as the script probably runs a lot more commands as well.
Comments
Post a Comment