How to enable stacktrace react-native run-android command?

∥☆過路亽.° 提交于 2019-12-05 01:31:58
EricHua23

Try to build react-native-device-info separately with ./gradlew assembleDebug and make sure react-native-device-info is all right. I have the same problems because of my network which is blocked and can not reach jcenter.

By the way, --stacktrace should be add as gradle parameters, I doubt react-native does not pass it to gradle.

Venryx

@EricHua23's answer is basically correct, except that instead of running ./gradlew assembleDebug --stacktrace, you should run ./gradlew.bat installDebug --stacktrace, as this is the command that's actually run by react-native run-android. (and some of the errors you'd want to get the stack-trace for only occur in the installing/late-build portion, rather than the assembly portion)

Also, make sure you run it in the android folder. (so run cd android in the console before running the gradlew command)

Give a try to react-native start

This shows errors verbosely.

If running on Windows run following command in your project's root directory:

 1. cd android 
 2. gradlew.bat installDebug --stacktrace
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!