解决Android中No resource found that matches android:TextAppearance.Material.Widget.Button.Inverse问题
16lz
2021-12-04
如果在刚够构建Android Studio项目的时候,运行发现,出现没找到资源的错误!找不到com.android.support/appcompat-v7/23.0.1/res/values-v23/values-v23.xml
/路径/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.1/res/values-v23/values-v23.xmlError: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’
更多相关文章
- Windows环境下Android(安卓)Studio系列3—简单设置
- Android(安卓)ADT和SDK历史版本离线包下载地址
- Android(安卓)Studio 初体验
- Android(安卓)SDK Android(安卓)NDK Android(安卓)Studio 官方下
- Android(安卓)SDK Android(安卓)NDK Android(安卓)Studio 官方下
- Eclipse Android(安卓)SDK Manager下载失败解决
- windows下载android源代码
- ubuntu 安装 android studio
- 用Eclipse 来导入Android(安卓)工程 总结