Could not find com.android.support:support-v4:26.0.2
程序员文章站
2022-06-07 18:36:18
...
整个项目都没有使用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://*.com/questions/45245275/appcompat-support-library-version-for-sdk-platform-26
上一篇: Jetpack 之 LifeCycle 组件使用详解
下一篇: 保存文件内容
推荐阅读
-
Could not find any version that matches com.android.support:appcompat-v7:29.+
-
Android Studio Build报错:Could not download support-v4.aar (com.android.support:support-v4:28.0.0)
-
Could not find com.android.support:support-v4:26.0.2
-
Could not find any version that matches com.android.support:appcompat-v7:29.+
-
Android Studio Build报错:Could not download support-v4.aar (com.android.support:support-v4:28.0.0)