整个项目都没有使用26.0.2版本的内容,却报如下错误:
Error:Could not find com.android.support:support-v4:26.0.2.
Required by:
MyPorject:app:unspecified
MyPorject::app:unspecified > com.android.support:appcompat-v7:23.2.1
MyPorject::app:unspecified > com.android.support:support-v13:23.2.1
MyPorject::app:unspecified > com.android.support:design:23.2.1
MyPorject::app:unspecified > com.android.support:support-vector-drawable:23.2.1
Please install the Android Support Repository from the Android SDK Manager.
解决办法:
项目中的这个依赖导致的(由于这个依赖没有怎么使用,注释掉就解决了)
compile 'com.jakewharton:kotterknife:0.1.0-SNAPSHOT'
也可以 在项目的gradle中添加:
allprojects {
repositories {
jcenter()
....
maven {
url "https://maven.google.com"
}
}
}
参考:https://stackoverflow.com/questions/45245275/appcompat-support-library-version-for-sdk-platform-26