I've recently deleted some other projects from my eclipse workspace (permamently) and after that in my current project appeared some errors (R cannot be resolved to a variable).
I tired cleaning and building again project, but this time it doesn't help.
In resources, errors appears only in styles.xml files:
error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
I'm new in android development and I don't understand what's exactly wrong. Probably something with theme, but I tried to change it to something different - without effects.
Download the v7-appcompat library, import it into Eclipse and reference it in those projects which are showing this error. This will solve your problem.
Related
I'm a noob at Android programming, so I used Buildbox to make some kind of Android game...and when I was at the stage where I was supposed to import my game, 3 errors popped up in the problems section...I'm gonna just copy and paste them:
error: Error retrieving parent for item: No resource found that matches the given name '#android:style/Theme.Material.Light.DialogWhenLarge.NoActionBar'
The container 'Android Dependencies' references non existing library 'C:\Users\Ivan\Desktop\BBDOC EXPORT\WallJump\android\libs\google-play-services_lib\bin\google-play-services_lib.jar'
And the obvious one:
The project cannot be built until build path errors are resolved
I'm gonna upload a screenshot too...
Click here to see for yourself
If you guys need any more details just tell me.
My Xamarin Android project doesn't compile anymore, with a couple error messages saying
Error APT0000: Error retrieving parent for item: No resource found that matches the given name 'Widget.Design.TabLayout'
Other errors that were thrown previously were in the same style, but said
No resource found that matches the given name (at 'textColor' with value '#color/md_white_1000')
I am aware that this is a very common Xamarin bug that is normally fixed by cleaning and rebuilding or, in rare cases, by clearing all packages and package caches so that they are downloaded again. However, this did not fix my error. I also completely reinstalled Xamarin and Visual Studio, but the error persists. At this point, i don't really know what to do except completely reformat my Mac.
Are there any trouble shooting steps I missed? Is this a bug that is only present in some version so that I need to downgrade? Please help, as I haven't been able to compile my code now for two days.
The log is saying that the app could not find certain resources, like TabLayout and #color/md_white_1000.
Did you install the NuGet packages related to Android AppCompat libraries? In NuGet Package Manager, search for AppCompat libraries. For example:
https://www.nuget.org/packages/Xamarin.Android.Support.v7.AppCompat
Those are necessary to find AppCompat resources and themes.
I found the answer: Apparently the newest version of the Xamarin AppCompat Package is corrupt. I was able to compile again by manually copying the project from my colleague, who hadn't updated his packages (the packages are in our .gitignore). That solved the problem and also explains why clearing the package caches didn't work: Visual Studio simply re-downloaded the corrupt package.
Out of nowhere my Android Studio project started giving me this error: Resource entry com.crashlytics.android.build_id is already defined. I've seen a similar question to mine here on SO, but the solution is not working for me. Every time I try to delete the duplicate entry, it just keeps regenerating on a project rebuild. I could really use any suggestions at this point. Thanks in advance!
Here is the whole error:
C:\Users\Alex\Documents\AppDevelopment\workspace\AsylumLakePreserve\build\intermediates\exploded-aar\workspace\google-play-services_lib\unspecified\res\values\values.xml
Error:(1) Resource entry com.crashlytics.android.build_id is already defined.
C:\Users\Alex\Documents\AppDevelopment\workspace\AsylumLakePreserve\build\intermediates\res\debug\values\com_crashlytics_build_id.xml
Error:(9, 1) Originally defined here.
As pointed out by #yehan in his comment below, these days the issue is most likely causes by not removing fabric decencies/data when upgrading to fire base.
Original:
You've probably already worked around this looking at how old the question is and looking at the error I'm not sure you've got the same issue... but for anyone else stumbling on this one I also ran into something similar whilst updating an old code base from Crashlytics to Fabric and speaking to the Fabric support team they stated that deleting the com_crashlytics_export_strings.xml that was under my app/src/.. directory folder was the correct solution.
I have been working on project without any issues and all of the sudden this error pops up when I try to build app. I tried deleting build folder, making project couple of times, invalidating android studio cache, restart, uninstaling instaling android studio etc. Please help, since this is driving me crazy :) Thanks!
Error:(1) A 'value' attribute is required for < enum > or < flag >
this is reported for appcompats color.xml file, when I removed appcompat from dependencies problem persisted referencing my project color.xml file, after i commented whole file, it persisted referencing color.xml from one other libraries which I used in project. So i think this is Android studio issue.
I have updated the my android SDK to android 5.0 with android support lib version to 21
when I try to add support v7 lib to my project it's showing following error in the appcompact-v7 lib project. before updating the Android SDK it's works fine.
appcompat_v7/res/values-large-v14/themes_base.xml:19: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Base.AppCompat.DialogWhenLarge.Base'.
appcompat_v7/res/values-large-v14/themes_base.xml:22: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Base.AppCompat.Light.DialogWhenLarge.Base'.
Can anyone help me to fix this. Thanks in advance.
I believe there is a bug in the 5.0 appcompat_v7 library. Rolling back to the preview release fixed the problem for me. Hopefully they will release an update/fix soon.
I had the same issue with my copy of v7-appcompat - I could not build it with the same errors.
What worked for me is completely removing the /res directory and copying it back from SDK. It seems that there were some old unused styles left.