appcompat-v7 版本造成的问题No resource found that matches the given name 'android:TextAppearance.Material.W

Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
Error:Execution failed for task ':app:processDebugResources'.

错误log提示如上所示:

出现原因,由于v7包的23.x版本中缺少部分资源所致。

解决方案:

build.gradle文件中,将

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.0.1'
}

修改为:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.2.1'
}
然后clean和Rebuild一下!


你可能感兴趣的:(异常处理)