Bug 29596 - Resource entry is already defined (APT0000)
Summary: Resource entry is already defined (APT0000)
Status: RESOLVED ANSWERED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Android Add-in ()
Version: 5.9
Hardware: PC Windows
: --- normal
Target Milestone: master
Assignee: Greg Munn
URL:
Depends on:
Blocks:
 
Reported: 2015-04-30 09:20 UTC by Jonathan
Modified: 2015-05-04 16:11 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
The String.xml that have error on build Xamarin (9.38 KB, text/xml)
2015-05-04 15:32 UTC, Jonathan
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description Jonathan 2015-04-30 09:20:57 UTC
Description of Problem:


Steps to reproduce the problem:
1. Update to new Xamarin Sturio 5.9
2. 


Actual Results:
Resource entry is already defined on Strings.xml

Expected Results:
No errors because may source code is that I published on Play Store

How often does this happen? 
Today after Xamarin Studio update

Additional Information:
Comment 1 Jonathan 2015-04-30 09:22:50 UTC
Update to Xamarin Studio 5.9 (build 431)
Comment 2 Greg Munn 2015-05-04 14:21:31 UTC
could you attach the strings.xml, did you update Xamarin Android as well?
Comment 3 Jonathan 2015-05-04 15:32:22 UTC
Created attachment 11054 [details]
The String.xml that have error on build Xamarin
Comment 4 Jonathan 2015-05-04 15:34:03 UTC
Greg, I Update my Xamarin to 5.9 (build 431). I attached the string.xml.

Thanks a lot
Comment 5 Greg Munn 2015-05-04 15:52:00 UTC
You have duplicate strings 

<string name="erroInesperado">Ocorreu um erro. Por favor tente novamente.</string>

and

<string name="erroInesperado">Ocorreu um erro inesperado em sua solicitação. Por favor, execute a operação novamente.</string>

Most likely what is happening is that you are now using a newer android tools version. The command to process the strings.xml is `aapt` and that has added errors over the years. It is likely that duplicate strings are now being treated as an error.

If you have multiple tools versions installed you can specify which version of the tools to use with the `$(AndroidSdkBuildToolsVersion)` MSBuild property:

<PropertyGroup><AndroidSdkBuildToolsVersion>21.1.1</AndroidSdkBuildToolsVersion></PropertyGroup>

But I'd suggest fixing the duplicates from the strings.xml.
Comment 6 Jonathan 2015-05-04 16:07:35 UTC
Greg, I don't saw this string. I remove the duplicated string and works fine.

Thanks a lot.

You are Great.
Comment 7 Greg Munn 2015-05-04 16:11:43 UTC
You're welcome. 

For the future, the error in the Error Pad should show you the name of the resource that is duplicated:

Error APT0000: Resource entry erroInesperado is already defined. (APT0000) (B29329)