Bug 26574 - Problems with removed resources in Android projects
Summary: Problems with removed resources in Android projects
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Android Designer ()
Version: 5.7
Hardware: PC Windows
: Normal normal
Target Milestone: master
Assignee: Jérémie Laval
Depends on:
Reported: 2015-01-29 15:53 UTC by Hubert
Modified: 2015-02-09 15:06 UTC (History)
3 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 for Bug 26574 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Hubert 2015-01-29 15:53:45 UTC
There is a problem with Android Resource files removed from the project but not deleted from disk.

I am using Xamarin Studio 5.7 but I believe the problem would be also in VS2013.

Example I:
Steps to reproduce:
1. Open Xamarin Studio, 
2. Create new Android Application
3. Build (just to be sure it works)
4. Open generated file Resource.designer.cs. There is class String with two fields: app_name and hello
5. Remove file Strings.xml from project. In the file Resource.designer.cs class String hasn't change (wrong!), but app won't compile (ok)
6. Open main.axml, change button text to "abcd", then save.
7. Two fields from class Strings dissappear(ok)
8. When you go back to edit button text and click the editor icon, you can still select one of two strings declared in removed file

Example II:
When you have one or more Android Library Project and Android Application with the reference to that library. When you remove any of the Resource file from library (without deletion), you will find it anyway in the compiled apk (in DEBUG mode)
Comment 1 Rajneesh Kumar 2015-01-30 04:50:24 UTC
I have checked this issue and able to reproduce this. To reproduce this issue I have followed the steps and instruction provided in bug description.

After following all steps I observed that user is able to select one of two strings declared in removed file. Here is the screencast for the same: http://www.screencast.com/t/6fpou6emFgiw

Ide Logs: https://gist.github.com/Rajneesh360Logica/1ceb4d6fae8bdab32246
Android tools log: https://gist.github.com/Rajneesh360Logica/7ee8bb764b50acd014e4

Environment Info:

=== Xamarin Studio ===

Version 5.7.1 (build 15)
Installation UUID: a7e29e93-6348-4126-9ebc-b2777c96a552
	Microsoft .NET 4.0.30319.18408
	GTK+ 2.24.22 (MS-Windows theme)
	GTK# 2.12.26

=== Xamarin.Android ===

Version: 4.20.0 (Business Edition)
Android SDK: E:\android-sdk
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: C:\Program Files (x86)\Java\jdk1.6.0_39
java version "1.6.0_39"
Java(TM) SE Runtime Environment (build 1.6.0_39-b04)
Java HotSpot(TM) Client VM (build 20.14-b01, mixed mode)

=== Build Information ===

Release ID: 507010015
Git revision: ce24e991948c7f3d88b0194a14fc1996d848ef51
Build date: 2015-01-26 14:31:20-05
Xamarin addins: 6895e3222bfa6910524708aa0633ff3db99bc3a0

=== Operating System ===

Windows 6.2.9200.0 (64-bit)