Resource entry com.crashlytics.android.build_id is already defined - Android Studio - android

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.

Related

Could Not parse Array item

I was working on my android studio when this error appeared in I think gradle-values files.
here is what messages say
/home/aayush/.gradle/caches/transforms-1/files-1.1/play-services-
cast-framework-
11.8.0.aar/32e84c2c10bff7a8fd7f6321ccbff502/res/values/values.xml
Error:(5, 1) error: could not parse array item.
Error:java.util.concurrent.ExecutionException:
com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for
details
I tried deleting the whole build folder,.gradle folder, cleaning and rebuilding folder, invalidating caches and restarting android studio but, this error comes again and again. I am using android studio 3.1, the latest one. please help. If you need any other detail, just tell me. i am facing this problem for the first time, so, dont know what to post.
I was facing that issue too.
That may be invoked in several reasons.
In my case, I got the error because of the 'strings.xml' file has like this components
<string name="today_string">'today'</string>
this mistakes made this error, and I converted 'today' to \'today\'
And it solved my issue. Refer.

Extreme case of "Error retrieving parent for item"

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.

Build error resource directory not found

I'v created a new android project in vs 2013 and installed Android.Support.Library.v7.AppCompat package and dependencies. But when I build the project, I got an error that says
resource directory
'[ProjectPath]\obj\Debug\resourcecache\B81A750477D10031D1844681B0F7EB17\res'
does not exist file: [ProjectPath]\AAPT
I'v cleaned the project
reopen it
rebuild it
but not help me.
I have encountered the same issue as you and have found a solution. I know this has been a long time since your post. Just put the solution here to help someone encounter similar issues.
My project can be built successfully previously, so this error must be caused by some kind of settings. A reasonable explanation and solution can be found in this link: http://smstuebe.de/2016/10/29/fix-android-app-compat/
This is caused by the incomplete Android SDK packages. The normal clean/rebuild won't help. Even if I reinstalled VS2015+Xamarin, I still have this issue.
So try the above solution if you came across similar issues.

R cannot be resolved to a variable - cleaning doesn't work

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.

Android ADT r12 for MAC

I am getting an error message regarding a styles.xml on my Eclipse for MAC OS X. Below is the error message:
error: Error retrieving parent for item: No resource found that matches the given name 'android:WindowTitleBackground'.
I googled this issue and found out that I will require an SDK r11 update to solve this problem. But since the latest SDK is r12, I downloaded using my Eclipse. But I still see this problem.
I am new to Android, so I do not really know how to troubleshoot this problem. I am hoping you guys can help me. Do let me know if I need to provide more information. Thanks in advance.
Here is a bug report where everything is explained: http://code.google.com/p/android/issues/detail?id=18659
WindowTitleBackground is a private resource and thus you cannot inherit from it, instead you should copy the parent resource.
Try this: #android:style/WindowTitleBackground
You need to specify which type this #android is, so adding style should work.

Categories

Resources