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

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.解决方案

  1. 将minSdkVersion设为API 14及以上(即Android 4.0,不兼容4.0以下版本)在这里插入图片描述
  2. 还没想到(哈哈)
  • 看了好多帖子,什么改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和库不在同一个盘符(呵呵)

  • 什么添加依赖(不知道哪儿步骤错了,没成功),

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值