1. 报错信息
E:\Workspace\eclipse-workspace\Application\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
E:\Workspace\eclipse-workspace\Application\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
E:\Workspace\eclipse-workspace\Application\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
E:\Workspace\eclipse-workspace\Application\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
E:\Workspace\eclipse-workspace\Application\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
2.报错原因
Android Support v7: 这个包是为了考虑照顾2.1及以上版本(但不包含更低)
使用上4.0版本的界面
3.解决方案
- 将minSdkVersion设为API 14及以上(即Android 4.0,不兼容4.0以下版本)
- 还没想到(哈哈)
-
看了好多帖子,什么改style(不能从根本上解决问题)——查看 res/values/styles.xml 下的报错点。
< style name="AppBaseTheme" parent="Theme.AppCompat.Light">
把这个改成
< style name="AppBaseTheme" parent="android:Theme.Light">
v11和v14相同改法,也可以直接删掉不用。改好后就没错了。
同理,将
< style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar">
改为< style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
-
什么project和库不在同一个盘符(呵呵)
-
什么添加依赖(不知道哪儿步骤错了,没成功),