allprojects { repositories { jcenter() maven { url "https://maven.google.com" } // 注意要添加 Google 仓库 mavenCentral() } }
如果你的 Android Gradle plugin 版本很高,例如 3.0.0-alpha1,那么你可简单的使用 google() 代替 maven。
例如:
allprojects { repositories { jcenter() google() // 注意要添加 Google 仓库 mavenCentral() } }