Android - 錯誤:"No resource found that matches the given name android:Theme.Material"
本文位址: http://blog.csdn.net/caroline_wendy
本文的合集已經編著成書,《進階Android開發強化實戰》,歡迎各位讀友的建議和指導。
在京東即可購買:https://item.jd.com/12385680.html
錯誤: "No resource found that matches the given name 'android:Theme.Material.Light.DarkActionBar'"
原因是: build.gradle出錯, Material是Android L版本的界面功能. 需要制定編譯器SDK版本(compileSdkVersion)為Android L.
android {
compileSdkVersion 'android-L'
buildToolsVersion '20.0.0'
defaultConfig {
minSdkVersion 'L'
targetSdkVersion 'L'
versionCode 1
versionName '1.0'
}
}
其實最低需要, 隻修改compileSdkVersion為'android-L'即可.