Android   发布时间:2022-04-28  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Android中生成的值-23文件出错大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我在尝试构建项目时遇到此错误.
Error:(3,5) No resource found that matches the given name (at 'cardBACkgroundColor' with value '?android:attr/colorBACkgroundFloaTing').
Error:Execution Failed for task ':app:processDebugresources'.
com.android.ide.common.process.processException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Home\ApPDAta\Local\Android\sdk\build-tools\23.0.2\aapt.exe'' finished with non-zero exit value 1

当我点击它时,它会转到生成文件夹的v-23值文件,其中包含以下代码.

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="CardView" parent="Base.CardView">
        <item name="cardBACkgroundColor">?android:attr/colorBACkgroundFloaTing</item>
    </style>
</resources>

这是我的app gradle文件

apply plugin: 'com.android.application'
android {
    compileSdkVersion 22
    buildToolsVersion '23.0.2'

    defaultConfig {
        applicationId "com.xxxx"
        minSdkVersion 19
        targetSdkVersion 22
        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:22.2.1'
    compile 'com.android.support:support-v4:22.2.1'
    compile 'com.android.support:design:22.2.1'
    compile 'com.commit451:inkpageinDicator:1.0.2'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'ch.acra:acra:4.5.0'
    compile 'com.pkmmte.view:circularimageview:1.1'
    compile 'com.google.android.gms:play-services-maps:7.8.0'
    compile 'com.google.android.gms:play-services-LOCATIOn:7.8.0'
    compile 'com.facebook.android:facebook-android-sdk:4.+'
    compile 'com.google.android.gms:play-services:7.8.0'
    compile 'com.google.code.gson:gson:2.6.2'

}

当我将gradle中的所有内容更改为版本23时,此错误消失,但因为我使用的是http库,并且它们已从23版本中删除,因此我被迫使用22版本.我的项目之前工作得非常好,突然间它开始出现这个错误.我所做的只是安装一个我在其他项目中使用的支持存储库,它也开始在这项目中给出错误.
有没有办法解决这个错误

解决方法

编译’com.facebook.android:facebook-android-sdk:4. “
需要V-23

在我的情况下,我使用v-22我将Facebook sdk版本更改为4.8编译’com.facebook.android:facebook-android-sdk:4.8.0′

大佬总结

以上是大佬教程为你收集整理的Android中生成的值-23文件出错全部内容,希望文章能够帮你解决Android中生成的值-23文件出错所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。