解決Android中No resource found that matches android:TextAppearance.Material.Widget.Button.Inverse問題
標簽: No resource foundandroidbuild.gradlevalues-v23.xml
2015-09-08 13:10 1871人閱讀 評論(4) 收藏 舉報
分類:
Android(26)
版權聲明:本文為博主原創文章,未經博主允許不得轉載。
如果在剛夠構建Android Studio項目的時候,運行發現,出現沒找到資源的錯誤!找不到com.android.support/appcompat-v7/23.0.1/res/values-v23/values-v23.xml
[html] view plaincopy
- /路徑/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.1/res/values-v23/values-v23.xml
- Error:Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
- Error:Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
這是API 23(Android 6.0)中的資源文件,而查看build.gradle,編譯的SDK只是為21,我們可以嘗試將compileSdkVersion設為23(如果sdk里面沒有下載API 23的,則需要下載),問題解決!
如果不想下載API 23怎么解決呢?降低appcompat的版本:將build.gradle里面的dependencies對應的appcompat版本降低:
將compile 'com.android.support:appcompat-v7:23.0.1'的版本改為:'com.android.support:appcompat-v7:22.2.1'