首页 > 代码库 > Android - 错误:"No resource found that matches the given name android:Theme.Material"

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.csdn.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"