gpt4 book ai didi

java - npm run android in React Native 给出构建错误

转载 作者:太空宇宙 更新时间:2023-11-04 01:58:06 29 4
gpt4 key购买 nike

运行react-native run-android后:

JS server already running.

在设备上构建并安装应用程序 (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'. 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'. Could not GET '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

  • 尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info--debug 选项运行以获得更多日志输出。

BUILD FAILED

我已经安装了 SDK 工具,并正确遵循了 React Native 文档,但仍然遇到了障碍。

我使用的是 Ubuntu 16。

最佳答案

转到 [您的项目名称]\android\app 中的 build.gradle 文件,然后在“依赖项”下,将“com.android.support:appcompat-v7:23.0.1”依赖项更改为 23.0.0。

关于java - npm run android in React Native 给出构建错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47095702/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com