检索项目的父项时出错:找不到符合给定名称“Theme.AppCompat.Light”的资源。我的R.java缺失了 [英] Error retrieving parent for item:No resource found that matches the given name 'Theme.AppCompat.Light'. MY R.java is missing

查看:908
本文介绍了检索项目的父项时出错:找不到符合给定名称“Theme.AppCompat.Light”的资源。我的R.java缺失了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google现在已经有Android Lollipop,我打开了我的sdk经理,决定更新几个包...这是从2天开始。
找不到主题



我也尝试过:无法重命名目录



不成功。我试图从Google下载一个新的sdk,从头开始安装,再也不行了。
这是错误。

  D:\〜\res\values\styles.xml:7:错误:检索项目的父项时出错:找不到符合给定名称Theme.AppCompat.Light的资源。 

D:\〜\res\values-v11\styles.xml:7:错误:检索项目的父项时出错:找不到符合给定名称Theme.AppCompat的资源。光'。

D:\〜\res\values-v14\styles.xml:8:错误:检索项目的父项时出错:找不到符合给定名称Theme.AppCompat的资源。 Light.DarkActionBar。


[1]:https://stackoverflow.com/questions/8839255/failed-to-rename-directory-tools-to-temp-toolpackage-old01-in-c- android-sdk-win

如果有人帮我尝试运行我的eclipse Juno,我将非常感谢。我也可以说我的一些旧应用程序正在使用较低的版本,但是当我创建一个新的应用程序时...错误:


import android.support.v7.app.ActionBarActivity;
它不是在阅读android.suppor.v7


那么如果我把它引用到我的Android应用程序我有一个!签名和许多错误,如:

  D:\Android Studio\adt-bundle-windows-x86_64-20140702\ sdk\extras\android\support\v7\appcompat\res\values-v21\themes_base.xml:193:错误:错误:找不到符合给定名称的资源:attr'android:colorControlNormal 。 
D:\Android Studio\adt-bundle-windows-x86_64-20140702\sdk\extras\android\support\v7\appcompat\res\values-v21\themes_base .xml:190:error:Error:找不到符合给定名称的资源:attr'android:colorPrimary'。
D:\Android Studio\adt-bundle-windows-x86_64-20140702\sdk\extras\android\support\v7\appcompat\res\values-v21\themes_base .xml:191:error:错误:找不到符合给定名称的资源:attr'android:colorPrimaryDark'。


解决方案

对于最新的(21.0.2)版本的Android支持库解决方案是将appcompat_v7项目的构建目标更改为API 21(Android 5.0),清理并重建。


Google has now Android Lollipop, I opened my sdk manager and decided to update couple of packages... It is furstrating me from 2 days. Can't find theme

I have also tried this: Failed to rename directory

Unsuccessful. I tried to download a new sdk from Google and install from scratch, did not work again. Here is the error.

D:\~\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.

 D:\~\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.

D:\~\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.


  [1]: https://stackoverflow.com/questions/8839255/failed-to-rename-directory-tools-to-temp-toolpackage-old01-in-c-android-sdk-win

I will be very thankful if someone help me try running my eclipse Juno. I can also say that some of my old apps are working with lower version, but when I create a new one... error:

import android.support.v7.app.ActionBarActivity; It is not reading the android.suppor.v7

then if I reference it to my android app I have a ! sign and lots of mistakes like:

   D:\Android Studio\adt-bundle-windows-x86_64-20140702\sdk\extras\android\support\v7\appcompat\res\values-v21\themes_base.xml:193: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
 D:\Android Studio\adt-bundle-windows-x86_64-20140702\sdk\extras\android\support\v7\appcompat\res\values-v21\themes_base.xml:190: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
 D:\Android Studio\adt-bundle-windows-x86_64-20140702\sdk\extras\android\support\v7\appcompat\res\values-v21\themes_base.xml:191: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.

解决方案

For me with the latest (21.0.2) version of Android Support Library the solution was to change the build target for appcompat_v7 project to API 21 (Android 5.0), clean and rebuild.

这篇关于检索项目的父项时出错:找不到符合给定名称“Theme.AppCompat.Light”的资源。我的R.java缺失了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆