Error:(24, 11) Failed to resolve: com.android.support:appcompat-v7:8.0.+

大兔子大兔子 提交于 2019-12-23 16:18:13

问题


Pleas help with this error cause it's my first android project ! Gradle Sync: pply plugin: 'com.android.application'

android {
    compileSdkVersion 8
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.example.interceptor.myapplication"
        minSdkVersion 5
        targetSdkVersion 8
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:8.0.+'

}

On Gradle console i get: FAILURE: Build failed with an exception.

  • What went wrong: A problem occurred configuring project ':app'.

    Could not resolve all dependencies for configuration ':app:_debugCompile'. Could not find any version that matches com.android.support:appcompat-v7:8.0.+. Versions that do not match: 24.0.0-alpha1 23.2.1 23.2.0 23.1.1 23.1.0 + 14 more Searched in the following locations: https://jcenter.bintray.com/com/android/support/appcompat-v7/maven-metadata.xml https://jcenter.bintray.com/com/android/support/appcompat-v7/ file:/D:/Users/INTERCEPTOR/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/maven-metadata.xml file:/D:/Users/INTERCEPTOR/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/appcompat-v7/maven-metadata.xml file:/D:/Users/INTERCEPTOR/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/appcompat-v7/ Required by: MyApplication:app:unspecified

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED


回答1:


You should use the correct version for the appcompat-v7 dependency.

The latest stable version of the above-mentioned dependency to now is:

    compile 'com.android.support:appcompat-v7:23.2.1'

Use it as above and make sure you installed/updated to the latest version in SDK Manager before.



来源:https://stackoverflow.com/questions/35960303/error24-11-failed-to-resolve-com-android-supportappcompat-v78-0

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!