安裝黃油刀依賴產生這種錯誤同步失敗的搖籃,找不到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 –