错误:(24, 11) 无法解决:com.android.support:appcompat-v7:8.0.+ [英] Error:(24, 11) Failed to resolve: com.android.support:appcompat-v7:8.0.+

查看:61
本文介绍了错误:(24, 11) 无法解决:com.android.support:appcompat-v7:8.0.+的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助解决此错误,因为这是我的第一个 android 项目!摇篮同步:应用插件:'com.android.application'

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.+'

}

在 Gradle 控制台上,我得到:FAILURE:构建失败,出现异常.

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

  • 出了什么问题:配置项目:app"时出现问题.

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

无法解析配置 ':app:_debugCompile' 的所有依赖项.找不到与 com.android.support:appcompat-v7:8.0.+ 匹配的任何版本.不匹配的版本:24.0.0-alpha123.2.123.2.023.1.123.1.0+ 14 更多在以下位置搜索:https://jcenter.bintray.com/com/android/support/appcompat-v7/maven-metadata.xmlhttps://jcenter.bintray.com/com/android/support/appcompat-v7/文件:/D:/Users/INTERCEPTOR/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/maven-metadata.xml文件:/D:/Users/INTERCEPTOR/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/appcompat-v7/maven-metadata.xml文件:/D:/Users/INTERCEPTOR/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/appcompat-v7/要求:我的应用程序:应用程序:未指定

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

  • 试试:使用 --stacktrace 选项运行以获取堆栈跟踪.使用 --info 或 --debug 选项运行以获得更多日志输出.

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

    构建失败

    推荐答案

    您应该为 appcompat-v7 依赖项使用正确的版本.

    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'
    

    如上使用,并确保您之前在 SDK Manager 中安装/更新到最新版本.

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

    这篇关于错误:(24, 11) 无法解决:com.android.support:appcompat-v7:8.0.+的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    相关文章
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆