欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

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

相关标签: studio