Error retrieving parent for item: No resource found that matches the given name 'android:TextAppeara

转载请标明出处:http://blog.csdn.net/xx326664162/article/details/50218623 文章出自:薛瑄的博客

你也可以查看我的其他同类文章,也会让你有一定的收货!

这篇文章中 http://www.apkbus.com/android-246037-1-1.html?_dsign=361a7403,有一处地方也是关于这个报错,但是他的分析错误,这个报错和buildToolsVersion的版本没有关系

错误信息:

在clear Project 和rebuild Project 的时候,报以下错误:

  • Error retrieving parent for item: No resource found that matches the given name’android:TextAppearance.Material.Widget.Button.Inverse’.

  • Error:Execution failed for task ‘:app:processDebugResources’.> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process ‘command ‘d:\Android\sdk\build-tools\23.0.1\aapt.exe” finished with non-zero exit value 1

示例代码:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.example.xx.myqr"
        minSdkVersion 19
        targetSdkVersion 23
        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:19.+'
    compile 'com.android.support:appcompat-v7:23.0.1'
//    compile 'com.android.support:design:22.2.1'
}

错误原因:

compileSdkVersion 版本比support 版本低,没有发现Material Design的Theme

我的分析:
com.android.support:appcompat-v7:23.0.1库中没有包含这个Material 的部分资源(例如:Material.Widget.Button.Inverse),这些资源被包含在compileSdkVersion 23 ,但是在compileSdkVersion 22 中又没有,所以出现这样的错误

如果我的分析有误,还望高人相告

compileSdkVersion 22 
改为
compileSdkVersion 23 

就可消除错误
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

薛瑄

文章不错,请博主吃包辣条

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值