Android - 错误:"No resource found that matches the given name android:Theme.Material"

时间:2023-03-09 04:27:33
Android - 错误:"No resource found that matches the given name android:Theme.Material"

Android - 错误:"No resource found that matches the given name android:Theme.Material"

本文地址: http://blog.****.net/caroline_wendy

错误: "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'就可以.

Android - 错误:"No resource found that matches the given name android:Theme.Material"