[英]Gradle error after update: com.android.tools:sdk-common
I updated Android Studio to the last version (3.1 Canary 8) and mandatorily the com.android.tools.build:gradle to version 3.1.0-alpha08, but syncing the project I get this error: 我将Android Studio更新到最后一个版本(3.1 Canary 8)并强制将com.android.tools.build:gradle更新到版本3.1.0-alpha08,但同步项目我收到此错误:
Could not find sdk-common.jar (com.android.tools:sdk-common:26.1.0-alpha08).
Searched in the following locations:
https://maven.google.com/com/android/tools/sdk-common/26.1.0-alpha08/sdk-common-26.1.0-alpha08.jar
I searched around but not solution found, can someone help me solve this issue? 我四处搜索但未找到解决方案,有人可以帮我解决这个问题吗?
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0-alpha07'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.1.2'
}
}
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Thanks a lot in advance. 非常感谢提前。
UPDATE: this is the new bukd.gradle (project): 更新:这是新的bukd.gradle(项目):
buildscript {
repositories {
google()
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0-alpha08'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.1.2'
}
}
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
为了知识;)我通过在官方文档中建议的存储库块中的jcenter()上面添加google()来修复它: developer.android.com/studio/build/index.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.