Bug 6539 - Duplicate generated R.java class
Summary: Duplicate generated R.java class
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 4.2.x
Hardware: PC Mac OS
: High major
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2012-08-15 09:40 UTC by Jérémie Laval
Modified: 2012-08-21 10:18 UTC (History)
6 users (show)

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

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:

Description Jérémie Laval 2012-08-15 09:40:09 UTC
Packaging generates two version of R.java, one in obj/Debug/android/src/mobilewrench/mobilewrench and one in obj/Debug/android/mobilewrench/mobilewrench

Error occured after switching from Release to Debug.

Installation UUID: b130548b-e7a5-4a30-bf99-198964a46352
	Mono 2.10.9 (tarball)
	GTK 2.24.10
	GTK# (
	Package version: 210090011
Apple Developer Tools:
	 Xcode 4.4.1 (1488)
	 Build 4F1003
Mono for Android: 4.2.5
Android SDK: /Users/jeremie/mono/android-sdk-macosx
	Supported Android versions:
		1.6   (API level 4)
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		3.2   (API level 13)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
Java SDK: /usr
Monotouch: 5.3.5
Build information:
	Release ID: 30004003
	Git revision: a4a635018f425d71a253d39114d945c4d6f7cbdb-dirty
	Build date: 2012-08-08 00:46:26+0000
	Xamarin addins: 0438cfee6f65a2a054576c9ef590fafea7cb2013
Operating System:
	Mac OS X 10.7.4
	Darwin dragan 11.4.2 Darwin Kernel Version 11.4.2
	    Wed May 30 20:13:51 PDT 2012
	    root:xnu-1699.31.2~1/RELEASE_X86_64 x86_64
Comment 1 Jérémie Laval 2012-08-15 09:56:57 UTC
I could reproduce on a fresh install so the problem is not related to changing project mode.
Comment 2 Atsushi Eno 2012-08-16 10:57:54 UTC
I couldn't reproduce the issue with monodroid 4.2.5 and monodevelop/md-addins master on Linux so far.
Comment 7 Jens 2012-08-20 18:10:39 UTC
I can reproduce this. 
config is identical to Jérémie except its Mountain Lion here...
Comment 8 Atsushi Eno 2012-08-21 03:18:38 UTC
Jeremie cannot reproduce this after restarting PC, so we were going to close this bug. If you can reproduce the issue please post a reproducible project.
Comment 10 Atsushi Eno 2012-08-21 09:28:48 UTC
Thanks for the test case, but I could reproduce this only when I had bad intermediary remainings on bin/* and obj/*. Please make sure to execute Clean operation and there is no obj and/or bin directories, and it won't happen.

If it still happens after cleaning and making sure to have removed obj and bin, please reopen and we'll revisit and/or ask more details.
Comment 11 Jens 2012-08-21 09:47:40 UTC
after cleaning this folders it worked fine again (on beta)

anyway, this is something probably no user finds out by themself. Is there a way to do it automaticly (I did it using the finder). 
I know I did "clean" a lot of times without that message going away, and that would be what I expected to avoid such problems...

Comment 12 Stephen Shaw 2012-08-21 10:18:00 UTC
I'd argue that this isn't invalid or resolved.  Maybe it should be another bug, but that seems broken to me.  Shouldn't MD be smart enough to clean up if there is a problem?

The experience should be smooth I'd think.

OR, I supposed the bug would be that MD shouldn't get into that bad state?