可能会出现如下错误
Gradle sync failed: Could not find com.android.tools.build:gradle:3.0.0.
Searched in the following locations:
file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom
file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.jar
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 :
谷歌增加了google() 自己的仓库,其他的国内能访问的仓库没有gradle3.0包所以报错
添加 maven { url'https://dl.google.com/dl/android/maven2/'} 这个仓库到repositories下重新编译下
网友评论