解决Android中No resource found that matches android:TextAppearance.Material.Widget.Button.Inverse问题
2016-06-16 15:41
471 查看
如果在刚够构建Android Studio项目的时候,运行发现,出现没找到资源的错误!找不到com.android.support/appcompat-v7/23.0.1/res/values-v23/values-v23.xml
[html] view plaincopy/路径/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.1/res/values-v23/values-v23.xml
Error: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'
如果想了解更多:http://stackoverflow.com/questions/32092511/resource-error-in-android-studio-after-update-no-resource-found
[html] view plaincopy/路径/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.1/res/values-v23/values-v23.xml
Error: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'
如果想了解更多:http://stackoverflow.com/questions/32092511/resource-error-in-android-studio-after-update-no-resource-found
相关文章推荐
- 176 php 微信第三方平台填坑记
- HTML简单购物数量小程序
- iOS开发——时间格式类
- ios 10 新系统功能
- 【Android】监听自定义通知栏消息事件
- iOS storyboard创建Navigation Controller
- 正则表达式在iOS中的运用
- Android Studio利用Gradle删除没有使用到的资源和代码文件
- iOS 地图显示比例设置 (这里是当前的位置信息代理方法中实现)
- 【Android】30、常见控件的使用方法——ImageView
- iOS程序内部跳发短信
- Unity3d--物体移动到鼠标点击位置
- swift 字符串的截取 以及 Range 的用法
- Android CountDownTimer倒计时器的使用
- iOS开发中地图(MapKit)的使用
- 小红书CTO郄小虎:腾讯云让小红书更专注
- Android代码规范
- 微信公众号推送地图
- iOS tintColor与backgroundColor的区别
- Android用AIDL创建Service