安装黄油刀依赖产生这种错误同步失败的摇篮,找不到com.android.support:support-annotations:23.3.0
Error:Could not find com.android.support:support-annotations:23.3.0.
Required by:
Butter:app:unspecified
Butter:app:unspecified > com.jakewharton:butterknife:8.0.1
Butter:app:unspecified > com.jakewharton:butterknife-compiler:8.0.1 > com.jakewharton:butterknife-annotations:8.0.1
Please install the Android Support Repository from the Android SDK Manager.
<a href="openAndroidSdkManager">Open Android SDK Manager</a>
我已经安装了支持库,但它仍然出现此错误。这是依赖如何摇篮看起来像
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:support-annotations:23.3.0'
compile 'com.jakewharton:butterknife:8.0.1'
apt 'com.jakewharton:butterknife-compiler:8.0.1'
}
我还添加插件apply plugin: 'com.neenbedankt.android-apt'
和存储库
jcenter()
mavenCentral()
maven{
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
您确定安装了该版本的注释库吗? – fractalwrench
无论如何,你应该可以使用注释,这要归功于v7的依赖关系,而据我所知,它依赖于注释。删除该行,以便让这两个库保持同步。 – natario
访问此:https://github.com/JakeWharton/butterknife/blob/master/build.gradle –