当运行npx响应-本机运行-android错误时,生成失败
配置根项目“AwesomeProject”时出现问题。无法解析配置的所有工件“:类路径”。无法下载protobuf-java-3.4.0.jar (com.google.Protobuf:protobuf:3.4.0)无法获得资源“https://jcenter.bintray.com/com/google/protobuf/protobuf-java/3.4.0/protobuf-java-3.4.0.jar”。
下面是我的build.gradle文件
buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
}
repositories {
google()
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:3.5.2")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
google()
jcenter()
maven { url 'https://www.jitpack.io' }
}
}发布于 2020-06-07 04:45:25
解决了这个问题,是因为某个网络问题,我无法访问存储库
https://stackoverflow.com/questions/61997382
复制相似问题