使用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-library

简单来说就是新的eclipse默认模版主题UI须要使用比較高版本号api,假设须要支持低版本号,须要导入appCompact库来支持。网上一般给出的解法:

  1. File->Import (android-sdk\extras\android\support\v7). Choose "appcompat"
  2. Project-> properties->Android. In the section library "Add" and choose "appCompat"
包含stackoverflow上也有非常多人遇到,但非常多人通过这个解决。但我就是没办法解决。

后来发现这个是eclipse的bug。假设你引用的库和你的代码不在一个盘符,就有此异常。

我的代码在E盘。appCompact的库在D盘,我从新将其移动到E盘就ok。

fuck,浪费好多时间。
有遇到相同问题的可參考。

Theme.AppCompat.Light无法找到问题的更多相关文章

  1. 项目引入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 ...

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

    No resource found that matches the given name 'Theme.AppCompat.Light 的完美解决方案 首先这个问题的产生是由于缺少Theme.App ...

  3. Theme.AppCompat.Light报错

    style文件中的Theme.AppCompat.Light报错,Error retrieving parent for item: No resource found that matches th ...

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

    关于为何出现No resource found that matches the given name ‘Theme.AppCompat.Light’的原因 这边博客已经写的很清楚了 大家可以参考一下 ...

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

    转载:http://www.360doc.com/content/15/0316/15/9200790_455576135.shtml 由于我在配置安卓环境时也碰到了类似问题,用这篇博客解决了主要问题 ...

  6. android中出现Error retrieving parent for item: No resource found that matches the Theme.AppCompat.Light

    styles.xml中<style name="AppBaseTheme" parent="Theme.AppCompat.Light">提示如下错 ...

  7. error: Error retrieving parent for item: 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.AppCom ...

  8. 【android】新手容易遇到的[error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.]Theme出错的问题

    一.概述 近期刚接手了一个项目,开发工具为eclipse,由于版本较低,且考虑到如果转android studio项目的话,会其他人的维护带来困难,所以想着还是维护项目原来的开发环境吧. 但是导入项目 ...

  9. 创建Android项目时出错——No resource found that matches the given name 'Theme.AppCompat.Light'

    创建Android项目时出错,error: Error retrieving parent for item: No resource found that matches the given nam ...

随机推荐

  1. Doki Doki Literature Club

    Doki Doki Literature Club! is a visual novel developed by Team Salvato. The protagonist is invited b ...

  2. POJ 2549:Subsets(哈希表)

    [题目链接] http://poj.org/problem?id=2549 [题目大意] 给出一个数集,从中选择四个元素,使得a+b+c=d,最小化d [题解] 我们对a+b建立Hash_table, ...

  3. 【bzoj4808】【马】二分图最大点独立集+简单感性证明

    (上不了p站我要死了,侵权度娘背锅) Description 众所周知,马后炮是中国象棋中很厉害的一招必杀技."马走日字".本来,如果在要去的方向有别的棋子挡住(俗称"蹩 ...

  4. SQL表操作习题5 26~35题

  5. SQL表操作习题2 1~10题

  6. 一些 iOS 常用的第三方库

    网络通信 AFNetworking 轻量级的通讯类库,使用非常简单.建议更新到最新版,前几天看新闻说之前有个逻辑性的 bug https://github.com/AFNetworking/AFNet ...

  7. Android Linux内核编译

    平台: Wind7_64 + Ubuntu12_04_64 + VMware 这里以Android5.0为例: Android5.0 可以到这里下载:115网盘礼包码:5lbd7crtk1wzhttp ...

  8. [置顶] kubernetes资源类型--pod和job

    pod Pod是K8S的最小操作单元,一个Pod可以由一个或多个容器组成:整个K8S系统都是围绕着Pod展开的,比如如何部署运行Pod.如何保证Pod的数量.如何访问Pod等. 特点 Pod是能够被创 ...

  9. Ubuntu下安装配置JDK

    第一步:下载jdk-7-linux-i586.tar.gz wget -c http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-i586 ...

  10. maven自己主动编译,解决你每次代码改动须要又一次编译的繁琐

    maven结构的项目,我们在每次改动代码后都会须要手动编译,以下命令能够解决此问题.仅仅要代码改动.会自己主动帮你编译. 进入项目文件夹运行:mvn -U eclipse:clean eclipse: ...