升级android sdk到5.0,创建项目错误解决方法
来源:互联网 发布:网络劫持金山毒霸 编辑:程序博客网 时间:2024/04/29 20:57
一. ERROR:No resource found that matches the given name 'Theme.AppCompat.Light'
http://www.tuicool.com/articles/YreyEn3
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
通过stackoverflow查到其解决方法,如下:
1.File->Import (android-sdk\extras\android\support\v7). Choose "appcompat"
在"文件"中导入sdk路径extras\android\support\v7中的appcompat文件夹.如下图所示:
Project-> properties->Android. In the section library "Add" and choose "appCompat"
此时问题即可解决,能正确运行.
问什么会出现这个问题呢?这是我整合“随时拍”项目其他人的代码,他的版本比我的低,新的eclipse默认模版主题UI需要使用比较高版本api,如果需要支持低版本,需要导入appCompact库来支持.希望文章能解决大家的bug.
二. 导入android-support-v7-appcompat出现问题: android:Widget.Material.ActionButton
http://www.bubuko.com/infodetail-700302.html
[2014-12-03 11:49:13 - android-support-v7-appcompat] E:\my project\android\android-support-v7-appcompat\res\values-v21\styles_base.xml:75: error: Error retrieving parent for item: No resource found that matches the given name ‘android:Widget.Material.ActionButton‘.
[2014-12-03 11:49:13 - android-support-v7-appcompat] E:\my project\android\android-support-v7-appcompat\res\values-v21\themes_base.xml:191: error: Error: No resource found that matches the given name: attr ‘android:colorPrimaryDark‘.
[2014-12-03 11:49:13 - android-support-v7-appcompat]
解决办法:
将文件project.properties中的
target=android-19
改为
target=android-21
后clean
即可解决
本文向大家讲解的是升级android sdk到5.0,创建项目错误:No resource found that matches the given name 'android:Widget.Material.A 的原因及解决方法,感兴趣的同学参考下。
解决方案1:
- 升级android sdk到5.0,创建项目错误解决方法
- 升级android sdk到5.0,创建项目错误:No resource found that matches the given name 'android:Widget...... '解决方法
- 升级android sdk到5.0,创建项目类似错误:appcompat_v7\res\values-v21 \themes_base.xml:191: error: Error: No resour
- 升级android sdk到5.0时,创建项目出现错误:No resource found that matches the given name 'android:Widget.Material.A
- ADT升级到23.0.2之后创建Android项目错误
- ADT升级到23.0.2之后创建Android项目错误
- Android SDK Tools 升级到revision 17+后创建FragmentActivity失败问题的解决方法
- Android SDK 升级失败解决方法
- android的SDK升级解决方法
- adt 和 sdk升级到最新后,创建新项目有问题,解决方法
- cocos2d-x升级到3.4与创建android项目
- Android SDK手动升级到Android 5.0(API Level 21)
- Android老版本项目导入到新版SDK提示错误
- Android老版本项目导入到新版SDK提示错误
- Android SDK Tools 升级到revision 17+后Admob不能使用问题的解决方法
- 【转】升级android sdk到5.0…
- Android SDK升级到4.1出现的错误:Please ensure that adb is correctly located at...
- 升级到Android SDK 4.0.3 R2
- ActiveMQ的queue以及topic两种消息处理机制分析
- 转载巧用FPGA中资源
- RichEdit 取消全选
- MBR&GPT硬盘分区类型&属性详解(Win下更改/设置OEM/恢复分区方法)
- Centos 6.6 install gcc-4.8.2
- 升级android sdk到5.0,创建项目错误解决方法
- 我在学习爬虫(二)
- SQL 2000挂马的批量替换
- getchar()函数getch()函数区别?
- ubuntu解压缩命令(转+收藏)
- Netty demo 时间查询
- 什么是iBeacons
- 4G时代的移动运营商们
- ssh 设置超时时间 Write failed: Broken pipe