Theme.AppCompat.Light报错

style文件中的Theme.AppCompat.Light报错,Error retrieving parent for item: No resource found that matches the given name ‘Theme.AppCompat.Light‘,最后找到原因,是因为Android兼容包appcompat-v7没有与该项目存在于同一workspace。

报出如下 android-support-v7-appcompat 库引用错误的问题:


经过一番来回实验以后才发现原来需要将你的应用工程也要放在与 android-support-v7-appcompat放在同一个workspace 中才可以。

因为我目前的默认workspace路径下已经有appcompat-v7,所以在import新项目时注意要勾选copy projects into workspace,这样就可以保证他们存在于同一个workspace中了

时间: 2024-08-30 08:13:51

Theme.AppCompat.Light报错的相关文章

error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.

导入项目时style.xml里报这个错,网上查说是因为这个项目要依赖项目android-support-v7-appcompat(导入方法是:在sdk目录下extras\android\support\v7这个下面的项目appcompat导入). 但是在导入这个项目后发现,项目本身就打了个红叉.再查,发现是这个项目本身就要求的系统高,结果一直改到6.0(版本号是23)时才去掉了红叉.(换了后要先clear下才能看到). error: Error retrieving parent for ite

项目引入android-support-v7-appcompat遇到的问题,no resource found that matches the given name 'android:Theme.AppCompat.Light'

一.问题 今天准备使用v7包中的ToolBar来用,但是在styles.xml中引入Theme.AppCompat.Light的时候,报错“no resource found that matches the given name 'android:Theme.AppCompat.Light'”. 二.解决 1.首先搜索了对应的报错,有很多回答需要导入android-support-v7-appcompat包,引入了几次,还是没有效果.终于功夫不负有心人,偶然看到一个博客中提到,需要将工程和an

Android 创建项目出现No resource found that matches the given name Theme.AppCompat.Light

关于为何出现No resource found that matches the given name 'Theme.AppCompat.Light'的原因 这边博客已经写的很清楚了 大家可以参考一下 http://www.jianshu.com/p/6ad7864e005e 在解决该异常时遇到了一些问题在这里补充一下 1.eclipse的SDK manager没有android support library  网上给出的解决方案都是利用更换镜像源来解决的,可是现在baidu能找到的镜像中都不

Theme.AppCompat.Light无法找到问题(转)

使用adt开发新建一个Android app,选择支持的SDK版本如果小于11(Android3.0)就会报如下错误. error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. 官网给出的答案是: https://developer.android.com/tools/support-library/setup.html#add-l

eclipse导入appcompat项目报错

标签 : Android 我们在eclipse导入开源项目后,经常会发现找不到类似Theme.AppCompat.Light.DarkActionBar的style,解决办法也比较简单,就是导入com.android.support:appcompat-v7包,不过又两点需要注意: 不能只导入appcompat-v7.jar包,而是要导入appcompat-v7项目 因为这个项目包含有资源文件,只导入jar包没有效果,这个项目地址是在: -\android-sdk\extras\android\

Theme.AppCompat.Light无法找到问题

使用adt开发新建一个Android app.选择支持的SDK版本号假设小于11(Android3.0)就会报例如以下错误. error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. 官网给出的答案是: https://developer.android.com/tools/support-library/setup.html#ad

No resource found that matches the given name 'Theme.AppCompat.Light 的完美解决方案

No resource found that matches the given name 'Theme.AppCompat.Light 的完美解决方案 首先这个问题的产生是由于缺少Theme.AppCompat.Light这个主题产生的,而这个主题 的是存在于android\support\appcompat-v7支持库中的,注意不是jar包. No resource found that matches the given name 'Theme.AppCompat.Light 的完美解决方

编译或运行时可能会出现错误: Error:Error retrieving parent for item: No resource found that matches the given name “Theme.AppCompat.Light”

这个问题我在刚开始写"HelloWorld"时就遇到,以为是API版本太高,下载了常用的API 19.17--一系列的,后来还是有问题.就上网查了很多,遇到几篇不错的文章,记录下来,方便以后查看. No resource found that matches the given name 'Theme.AppCompat.Light 的完美解决方案  http://www.360doc.com/content/15/0316/15/9200790_455576135.shtml And

解决IDEA下运行android项目 No resource found that matches the given name 'Theme.AppCompat.Light'.

1.右击项目选择 解决IDEA下运行android项目 No resource found that matches the given name 'Theme.AppCompat.Light'.