比23.2.1更新版本的com.android.support:appcompat-v7可用:24.0.0-alpha1

时间:2016-03-13 12:11:14

标签: android appcompat-v7-r24

出现以下错误

  

比23.2.1更新版本的com.android.support:appcompat-v4   可用:24.0.0-alpha1和更新版本   com.android.support:appcompat-v7比23.2.1可用:   24.0.0-α1

我的build.gradle文件:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.zkc.i2ctools"
        minSdkVersion 8
        targetSdkVersion 23
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile 'com.android.support:support-v4:23.2.1'
    compile 'com.android.support:appcompat-v7:23.2.1'
    compile files('libs/core-3.1.0.jar')
}

Gradle build with error。出了什么问题?

3 个答案:

答案 0 :(得分:24)

实际上,有一个错误,“Lint不应该建议alpha版本的支持库依赖” https://code.google.com/p/android/issues/detail?id=203270

更新(2016年3月21日)

该错误已与此合并 https://code.google.com/p/android/issues/detail?id=203321 并于3月11日修订为2.1 Future release

答案 1 :(得分:3)

我相信您可能会将该信息级日志项与错误级别日志项混淆。这样的日志将在您的应用程序中发生。但是,这并不意味着您的应用程序中的任何内容都已损坏。

我不相信你应该升级到较新版本的appcompat,除非它们包含你需要的关键功能/错误修复,否则它们将不再使用。

如果它无法构建,那就完全是另一个故事了。

答案 2 :(得分:0)

如果您希望Lint停止建议Alpha版本,则可以在项目根目录中创建lint.xml对其进行配置:

<?xml version="1.0" encoding="utf-8"?>
<lint>
    <!-- Don't warn about available alpha versions -->
    <issue id="GradleDependency">
        <ignore regexp="is available: .*alpha" />
    </issue>
</lint>

如果您愿意,可以避免使用Beta版本来代替行:

<ignore regexp="is available: .*[alpha|beta]" />