简体   繁体   English

检索项目的父项时出错:找不到与给定名称“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

Google has now Android Lollipop, I opened my sdk manager and decided to update couple of packages... It is furstrating me from 2 days. 谷歌现在已经安装了Android Lollipop,我打开了我的sdk经理,并决定更新几个套餐...它让我从2天开始流连忘返。 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. 我试图从谷歌下载一个新的sdk并从头开始安装,但没有再次运行。 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. 如果有人帮助我尝试运行我的日食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 它不是在读android.suppor.v7

then if I reference it to my android app I have a ! 然后,如果我将它引用到我的Android应用程序,我有一个! 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'.

I solved the problem changing in gradle 我解决了在gradle中改变的问题

compile 'com.android.support:appcompat-v7:21.0.0'
compile 'com.android.support:support-v4:21.0.0'

to

compile 'com.android.support:appcompat-v7:19.0.0'
compile 'com.android.support:support-v4:19.0.0'

and compile / target sdk to 19 并编译/目标sdk为19

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

您是否尝试将目标SDK更新为21并构建项目?

得到了同样的问题......也许一个解决方案是下载一个旧的SD并且不更新它。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 检索项目的父项时出错:找不到与给定名称匹配的资源'@android:style / Theme.AppCompat.Light.DarkActionBar' - Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.AppCompat.Light.DarkActionBar' 找不到与给定名称“ Theme.AppCompat.Light”匹配的资源。 Android Studio - No resource found that matches the given name 'Theme.AppCompat.Light'. Android Studio 错误:检索项目的父项时出错:找不到与给定名称“ Widget.AppCompat.Base”匹配的资源 - error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.Base' 检索父项时出错:找不到与Eclipse中给定名称匹配的资源 - Error retrieving parent for item: No resource found that matches the given name in Eclipse 检索父项时出错:找不到与给定名称android相匹配的资源 - Error retrieving parent for item: No resource found that matches the given name android 找不到资源 - Styles.xml和Theme.AppCompat.Light - No resource found - Styles.xml and Theme.AppCompat.Light 检索主题theme.appcompat.light.darkactionbar的父项时出错 - error retrieving parent for item theme.appcompat.light.darkactionbar 检索项目的父项时出错:找不到与给定名称'@android:style / AlertDialog'匹配的资源。 和'@android:style / DialogWindowTitle' - Error retrieving parent for item: No resource found that matches the given name '@android:style/AlertDialog'. and '@android:style/DialogWindowTitle' 错误:找不到与给定名称匹配的资源(在“主题”处,值为“ @ style / Theme.Material.Light.DarkActionBar”) - Error: No resource found that matches the given name (at 'theme' with value '@style/Theme.Material.Light.DarkActionBar') 无法使用android:Theme.AppCompat.Light - Cannot use android:Theme.AppCompat.Light
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM