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


本文的合集已经编著成书,《高级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'即可.


你可能感兴趣的:(Mystra,Android,Material,not,found)