No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
No resource found that matches the given name 'android:Widget.Material.Button.Colored'
不少时候Android Studio跟新到最高版本的Compile Sdk Version API23: Android6.0 和Build Tools Version 23.0.1android
时会使用到不少6.0的属性主题,windows
但是有时候咱们会使用V4包下的一些控件Viewpager,Fragment等,可能会出现一些兼容问题,若是你改为低版本的Compile SDK和Build Tools 来解决兼容问题,就会形成报错,即便你把那个V7包主题删掉,它又自动生成。app
报错信息:ide
E:\androidSutio\News\app\build\intermediates\res\merged\debug\values-v23\values-v23.xmlgradle
Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.ui
Error:(24) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.spa
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'E:\android-sdk-windows\build-tools\21.0.1\aapt.exe'' finished with non-zero exit value 1
debug
若是想干脆在把xml
compile 'com.android.support:appcompat-v7:23.1.1'这个V7删掉添加V4包到libs创建依赖,又会报V7包下的一些高版本属性主题找不到异常
E:\androidSutio\News\app\build\intermediates\res\merged\debug\values\values.xml
Error:(18) Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
E:\androidSutio\News\app\src\main\res\values\styles.xml
Error:(4, 5) No resource found that matches the given name: attr 'colorAccent'.
Error:(4, 5) No resource found that matches the given name: attr 'colorPrimary'.
Error:(4, 5) No resource found that matches the given name: attr 'colorPrimaryDark'.
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'E:\android-sdk-windows\build-tools\21.0.1\aapt.exe'' finished with non-zero exit value 1
其实解决方案很简单就在
compile 'com.android.support:appcompat-v7:23.1.1'
在依赖节点上面填上个v4支持包写法以下:
下面填上这句话就能够了
compile 'com.android.support:support-v4:23.1.1'