【发布时间】:2019-10-03 09:13:04
【问题描述】:
我无法使用代码 react-native run-android 运行 react-native 项目。我收到以下错误
info Starting JS server...
info Building and installing the app on the device (cd android && ./gradlew app:installDebug)...
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not create service of type AnnotationProcessorDetector using JavaGradleScopeServices.createAnnotationProcessorDetector().
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
error 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/getting-started.html
error Command failed: ./gradlew app:installDebug. Run CLI with --verbose flag for more details.
但如果我以 root `sudo react-native run-andoid' 运行它,它就会运行。
如何让项目在没有 root 权限的情况下运行??
【问题讨论】:
标签: javascript android react-native terminal jsx