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 

就可消除错误
发布了244 篇原创文章 · 获赞 799 · 访问量 234万+
展开阅读全文

新建android工程 报错,大神看过来

06-21

[2015-06-21 09:40:53 - HellowWord] F:\eclipse 32\workspace\HellowWord\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. [2015-06-21 09:40:53 - HellowWord] [2015-06-21 09:40:53 - HellowWord] F:\eclipse 32\workspace\HellowWord\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. [2015-06-21 09:40:53 - HellowWord] [2015-06-21 09:40:53 - HellowWord] F:\eclipse 32\workspace\HellowWord\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'. [2015-06-21 09:40:53 - HellowWord] [2015-06-21 09:40:55 - HellowWord] F:\eclipse 32\workspace\HellowWord\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. [2015-06-21 09:40:55 - HellowWord] [2015-06-21 09:40:55 - HellowWord] F:\eclipse 32\workspace\HellowWord\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. [2015-06-21 09:40:55 - HellowWord] [2015-06-21 09:40:55 - HellowWord] F:\eclipse 32\workspace\HellowWord\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'. [2015-06-21 09:40:55 - HellowWord] [2015-06-21 09:41:00 - HellowWord] F:\eclipse 32\workspace\HellowWord\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. [2015-06-21 09:41:00 - HellowWord] [2015-06-21 09:41:00 - HellowWord] F:\eclipse 32\workspace\HellowWord\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. [2015-06-21 09:41:00 - HellowWord] [2015-06-21 09:41:00 - HellowWord] F:\eclipse 32\workspace\HellowWord\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'. [2015-06-21 09:41:00 - HellowWord] [2015-06-21 09:54:11 - HellowAndroid] F:\eclipse 32\workspace\HellowAndroid\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. [2015-06-21 09:54:11 - HellowAndroid] [2015-06-21 09:54:11 - HellowAndroid] F:\eclipse 32\workspace\HellowAndroid\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. [2015-06-21 09:54:11 - HellowAndroid] [2015-06-21 09:54:11 - HellowAndroid] F:\eclipse 32\workspace\HellowAndroid\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'. [2015-06-21 09:54:11 - HellowAndroid] [2015-06-21 09:54:13 - HellowAndroid] F:\eclipse 32\workspace\HellowAndroid\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. [2015-06-21 09:54:13 - HellowAndroid] [2015-06-21 09:54:13 - HellowAndroid] F:\eclipse 32\workspace\HellowAndroid\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. [2015-06-21 09:54:13 - HellowAndroid] [2015-06-21 09:54:13 - HellowAndroid] F:\eclipse 32\workspace\HellowAndroid\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'. [2015-06-21 09:54:13 - HellowAndroid] [2015-06-21 09:54:14 - HellowAndroid] F:\eclipse 32\workspace\HellowAndroid\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. [2015-06-21 09:54:14 - HellowAndroid] [2015-06-21 09:54:14 - HellowAndroid] F:\eclipse 32\workspace\HellowAndroid\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. [2015-06-21 09:54:14 - HellowAndroid] [2015-06-21 09:54:14 - HellowAndroid] F:\eclipse 32\workspace\HellowAndroid\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'. [2015-06-21 09:54:14 - HellowAndroid] [2015-06-21 10:11:03 - HellowWorld] F:\eclipse 32\workspace\HellowWorld\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. [2015-06-21 10:11:03 - HellowWorld] [2015-06-21 10:11:03 - HellowWorld] F:\eclipse 32\workspace\HellowWorld\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. [2015-06-21 10:11:03 - HellowWorld] [2015-06-21 10:11:03 - HellowWorld] F:\eclipse 32\workspace\HellowWorld\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'. [2015-06-21 10:11:03 - HellowWorld] [2015-06-21 10:11:04 - HellowWorld] F:\eclipse 32\workspace\HellowWorld\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. [2015-06-21 10:11:04 - HellowWorld] [2015-06-21 10:11:04 - HellowWorld] F:\eclipse 32\workspace\HellowWorld\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. [2015-06-21 10:11:04 - HellowWorld] [2015-06-21 10:11:04 - HellowWorld] F:\eclipse 32\workspace\HellowWorld\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'. [2015-06-21 10:11:04 - HellowWorld] [2015-06-21 10:11:05 - HellowWorld] F:\eclipse 32\workspace\HellowWorld\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. [2015-06-21 10:11:05 - HellowWorld] [2015-06-21 10:11:05 - HellowWorld] F:\eclipse 32\workspace\HellowWorld\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. [2015-06-21 10:11:05 - HellowWorld] [2015-06-21 10:11:05 - HellowWorld] F:\eclipse 32\workspace\HellowWorld\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'. [2015-06-21 10:11:05 - HellowWorld] [2015-06-21 10:46:52 - HellowWorld1] F:\eclipse 32\workspace\HellowWorld1\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. [2015-06-21 10:46:52 - HellowWorld1] [2015-06-21 10:46:52 - HellowWorld1] F:\eclipse 32\workspace\HellowWorld1\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. [2015-06-21 10:46:52 - HellowWorld1] [2015-06-21 10:46:52 - HellowWorld1] F:\eclipse 32\workspace\HellowWorld1\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'. [2015-06-21 10:46:52 - HellowWorld1] [2015-06-21 10:46:54 - HellowWorld1] F:\eclipse 32\workspace\HellowWorld1\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. [2015-06-21 10:46:54 - HellowWorld1] [2015-06-21 10:46:54 - HellowWorld1] F:\eclipse 32\workspace\HellowWorld1\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. [2015-06-21 10:46:54 - HellowWorld1] [2015-06-21 10:46:54 - HellowWorld1] F:\eclipse 32\workspace\HellowWorld1\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'. [2015-06-21 10:46:54 - HellowWorld1] [2015-06-21 10:47:05 - HellowWorld1] F:\eclipse 32\workspace\HellowWorld1\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. [2015-06-21 10:47:05 - HellowWorld1] [2015-06-21 10:47:05 - HellowWorld1] F:\eclipse 32\workspace\HellowWorld1\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. [2015-06-21 10:47:05 - HellowWorld1] [2015-06-21 10:47:05 - HellowWorld1] F:\eclipse 32\workspace\HellowWorld1\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'. [2015-06-21 10:47:05 - HellowWorld1] 问答

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 代码科技 设计师: Amelia_0503

分享到微信朋友圈

×

扫一扫,手机浏览