Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.google.android.gms:play-services-vision:12.0.1.
升级到Android Sutido 3.0后,跑测之前的Model的main()方法方法时报错:
Error:Gradle: A problem occurred configuring root project 'MyApplication'.
> Could not resolve all files for configuration ':classpath'.
> Could not find com.android.tools.build:gradle:3.0.0.
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.jar
Required by:
project :
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
解决:
修改Project的build.gradle(注意:不是App的build.gradle),两处加上google()
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
}
}
allprojects {
repositories {
jcenter()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20