No resource found that matches the given name 'Theme.AppCompat.Light'

[2015-04-08 18:42:06 - Demo_FileOperate] E:\Android\src\Demo_FileOperate\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2015-04-08 18:42:06 - Demo_FileOperate] 
[2015-04-08 18:42:06 - Demo_FileOperate] E:\Android\src\Demo_FileOperate\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2015-04-08 18:42:06 - Demo_FileOperate] 
[2015-04-08 18:42:06 - Demo_FileOperate] E:\Android\src\Demo_FileOperate\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.

[2015-04-08 18:42:06 - Demo_FileOperate] 



http://blog.csdn.net/hack8/article/details/24679989

You need to do next:

  1. File->Import (android-sdk\extras\android\support\v7). Choose "appcompat" 
  2. Project-> properties->Android.  In  the  section library "Add" and choose "appCompat" 
  3. That is all!

 

做一个项目总是报错,Can't Find Theme.AppCompat.Light,郁闷半天,经过google找到此解决方案,记下。



http://www.eoeandroid.com/thread-564719-1-1.html



style.xml中<style name = "AppBaseTheme" parent="Theme.AppCompat.Light">提示如下错误,这是版本问题。
error:Error retrieving parent for tiem:No resource found that matches the given name "Theme.AppCompat.Light"
解决办法1:
在Eclipse中打开任意一个.java文件,输入android.R.style.这时你会看到一个提示列表,仔细看看,再对比一下,看哪个与原有的最接近就选择哪个。
用下划线替换成.就可以了。
将<style name = "AppBase Theme"  parent = "Theme.AppCompat.Light">
改为
<style name = "AppBaseTheme" parent ="android:Theme.Light">
同理,将
<style name ="AppBaseTheme" parent = "Theme.AppCompat.Light.DarkActionBar">
改为
<style name = "AppBase Theme" parent = "android:Theme.Holo.Light.DarkActionBar">
这些问题出现情况都在于查看网上分享代码的时候,我看到过很多次,然后也找到这个答案很多次,今天觉得自己记录下这个。

引用地址:http://blog.163.com/wslngcjsdxdr@126/blog/static/16219623020146971323118/

最好的解决办法:
下面几位大神的解释是对的。问题是support-v7包作为库添加到项目工程里面去。现将库复制粘贴进原项目的文件夹中,然后在导入开发工具,再在开发工具中作为库添加进项目。菜鸟,摸索阶段,请见谅。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值