[英]npm run android in react native giving build error
After running react-native run-android
: 运行
react-native run-android
:
JS server already running.
JS服务器已在运行。
Building and installing the app on the device (cd android && ./gradlew installDebug)... 在设备上构建和安装应用程序(cd android && ./gradlew installDebug)...
FAILURE: Build failed with an exception.
失败:构建失败,发生异常。
A problem occurred configuring root project 'pusher'.
配置根项目“推送器”时发生问题。 Could not resolve all dependencies for configuration ':classpath'.
无法解析配置':classpath'的所有依赖关系。 Could not download protobuf-java.jar (com.google.protobuf:protobuf-java:2.5.0) Could not get resource ' https://jcenter.bintray.com/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar '.
无法下载protobuf-java.jar(com.google.protobuf:protobuf-java:2.5.0)无法获取资源' https://jcenter.bintray.com/com/google/protobuf/protobuf-java/2.5。 0 / protobuf-java-2.5.0.jar '。 Could not GET ' https://jcenter.bintray.com/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar '.
无法获取“ https://jcenter.bintray.com/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar ”。 sun.security.validator.ValidatorException: No trusted certificate found
sun.security.validator.ValidatorException:找不到可信证书
--stacktrace
option to get the stack trace. --stacktrace
选项运行以获取堆栈跟踪。 Run with --info
or --debug
option to get more log output. --info
或--debug
选项运行以获取更多日志输出。 BUILD FAILED
建立失败
I have installed SDK tools,have followed react native documentation properly,but still have hit a snag. 我已经安装了SDK工具,已经正确地响应了本机文档,但是仍然遇到障碍。
I am using Ubuntu 16. 我正在使用Ubuntu 16。
转到[您的项目名称] \\ android \\ app中的build.gradle文件,并在“依赖项”下,将“ com.android.support:appcompat-v7:23.0.1”依赖项更改为23.0.0。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.