Bug 18013 - Getting build errors for android application when target framework is set to 4.4
Summary: Getting build errors for android application when target framework is set to 4.4
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 4.2.x
Hardware: PC Windows
: High critical
Target Milestone: 4.12.0 (KitKat)
Assignee: Marek Habersack
URL:
Depends on:
Blocks:
 
Reported: 2014-02-26 06:19 UTC by Nischal
Modified: 2014-02-28 13:00 UTC (History)
4 users (show)

Tags:
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:
Status:
VERIFIED FIXED

Description Nischal 2014-02-26 06:19:13 UTC
Steps to reproduce this issue:
1. Open or create android template application.
2. Build the application

Actual Result: Getting 13 build errors. I am observing this issue only on one Windows 8.1 machine while on another machine this is working fine. Also if I change target framework to 4.2 and below then application builds successfully. This i gist of build output: https://gist.github.com/saurabh360/9be5015b455dda891e9e

Expected Result: Application should build successfully.

Environment details:
=== Xamarin Studio ===

Version 4.2.4 (build 22)
Installation UUID: 655d0c20-4a23-4297-b952-3b2e9f208c30
Runtime:
	Microsoft .NET 4.0.30319.34003
	GTK+ 2.24.22 (MS-Windows theme)
	GTK# 2.12.25

=== Xamarin.Android ===

Version: 4.12.0 (Trial Edition)
Android SDK: C:\Users\User\AppData\Local\Xamarin\MonoForAndroid\AndroidSDK
	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.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
Java SDK: C:\Program Files\Java\jdk1.6.0_31
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b05)
Java HotSpot(TM) Client VM (build 20.6-b01, mixed mode, sharing)

=== Build Information ===

Release ID: 402040022
Git revision: 88a98c636089228fcf5eccdb882042e9ae13f1eb
Build date: 2014-02-24 10:54:30-05
Xamarin addins: ca7644335a81cb1a2e91c8879ef3f08fc28a6065

=== Operating System ===

Windows 6.2.9200.0

I am having AndroidSDK manager updated on this machine. 

Regression Status: I am getting same behavior with stable X.S 4.2.3(build 59) but I am sure it was working fine on this machine.

I am unable to diagnose this issue. Please look into it and let me know is there any setting has changed?
Comment 1 Mikayla Hutchinson [MSFT] 2014-02-26 11:12:05 UTC
4.4 assemblies not installed in the machine, for some reason.

C:\Program Files\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(989,5): warning MSB3644: The reference assemblies for framework "MonoAndroid,Version=v4.4" were not found.
Comment 4 Nischal 2014-02-27 05:06:20 UTC
PJ, someone has uninstalled Xamarin.Android 4.12.0-22 from this machine and installed MTVS 1.12.217 last evening. Now in morning when I installed Xamarin.Android 4.12.0-28 again and checked this issue it was working fine. Right now I am CLOSING this issue (as it is not happening any more for me) and will keep in mind to observe this behavior in future. If I'll get the same issue in future I'll EITHER RE-OPEN this issue (as mentioned in Comment #3) OR LOG a new one with all the fresh details.
Comment 5 PJ 2014-02-27 09:03:51 UTC
Ok so the running hypothesis in comment 4 is that installing on a machine that had the 1.12 build installed (in this case, 1.12.217) results in the platform 19 apk being left on disk when 4.12.0-28 is installed.

Can you verify this specifically?
Comment 6 PJ 2014-02-28 10:32:56 UTC
Not verified satisfactorily, REOPENING.
Comment 7 PJ 2014-02-28 10:33:27 UTC
This is fixed in the 4.12.1.0 builds, please verify.
Comment 8 Mohit Kheterpal 2014-02-28 13:00:38 UTC
I have checked this with X.Android 4.12.1.

I have upgrade my machine from X.Android 4.10.02014 to X.Android 4.12.1. Now I am able to deploy application on Emulator 19(API 4.4).

Hence closing this issue.