无法解析com.android.support:support-annotations 26.0.1 [英] Failed to resolve com.android.support:support-annotations 26.0.1
问题描述
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
testCompile 'junit:junit:4.12'
// ButterKnife
compile 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
// Parse SDK
compile 'com.parse:parse-android:1.16.0'
}
这是我的应用程序gradle依赖项.我不知道该怎么做才能解决它.我已经尝试从SDK Manager Android SDK Build Tools 26.0.1安装,并且我还具有最新版本的Android支持.
This is my app gradle dependencies. I don't know what to do to resolve it. I've tried installed from SDK Manager Android SDK Build Tools 26.0.1, and I also have latest version of Android support.
推荐答案
所有当前版本的Google库都位于Google的Maven存储库(maven.google.com
)中,而不位于旧的具有脱机功能的支持存储库中.
All current editions of Google libraries reside in Google's Maven repository (maven.google.com
), not in the old offline-capable support repositories.
在项目级别的build.gradle
文件中,确保allprojects
闭包如下所示:
In your project-level build.gradle
file, make sure that your allprojects
closure looks like this:
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
,或者在Android Studio 3.0+上,如下所示:
or, on Android Studio 3.0+, like this:
allprojects {
repositories {
jcenter()
google()
}
}
这篇关于无法解析com.android.support:support-annotations 26.0.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!