26
2017
09

Could not find com.android.support:support-v4:26.0.2

整个项目都没有使用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.

解决办法:
在项目的gradle中添加:

allprojects {
    repositories {
        jcenter()
        ....
        maven {
            url "https://maven.google.com"
        }

    }
}

参考:https://stackoverflow.com/questions/45245275/appcompat-support-library-version-for-sdk-platform-26

上一篇:Git:warning: ignoring broken ref refs/remotes/origin/HEAD 下一篇:Debian下用Glade开发一个简单的计算器