[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]
[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:
- File->Import (android-sdk\extras\android\support\v7). Choose "appcompat"
- Project-> properties->Android. In the section library "Add" and choose "appCompat"
- 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包作为库添加到项目工程里面去。现将库复制粘贴进原项目的文件夹中,然后在导入开发工具,再在开发工具中作为库添加进项目。菜鸟,摸索阶段,请见谅。 |