有人可以帮助我解决这个错误吗?
失败:构建失败,并出现异常。
找不到play-services-auth.jar(com.google.android.gms:play-services-auth:12.0.1)。 在以下位置搜索: https://jcenter.bintray.com/com/google/android/gms/play-services-auth/12.0.1/play-services-auth-12.0.1.jar
答案 0 :(得分:0)
尝试以此替换您的android / build.gradle,即在您的项目级gradle中以此
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
maven {url "https://maven.google.com"} //<---- this should be added and should be aboce jcenter
maven {url "$rootDir/../node_modules/react-native/android"}
jcenter()
}
}
在那之后清除您的gradle从cmd / terminal进入android文件夹 gradlew清洁 然后运行react native应用程序