Bug 21385 - Xamarin.Forms Blank App (Xamarin.Forms Portable) Android "Link SDK assemblies only" build fail
Summary: Xamarin.Forms Blank App (Xamarin.Forms Portable) Android "Link SDK assemblies...
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Xamarin.Forms Add-in ()
Version: 5.1
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: master
Assignee: Jason Smith [MSFT]
URL:
: 20061 ()
Depends on:
Blocks:
 
Reported: 2014-07-16 19:00 UTC by Ki
Modified: 2015-02-19 14:13 UTC (History)
7 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 Ki 2014-07-16 19:00:50 UTC
Instructions to reproduce.

Choose “Blank App (Xamarin.Forms Portable), 
Run the Android target with linking “Link SDK assemblies only"
Build will fail with…  

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Error executing task LinkAssemblies: error XA2006: Reference to metadata item 'System.Void Android.Animation.AnimatorListenerAdapter::OnAnimationPause(Android.Animation.Animator)' (defined in 'Xamarin.Forms.Platform.Android, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null') from 'Xamarin.Forms.Platform.Android, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' could not be resolved. (FormsLinkingBug.Android)
Comment 1 Shruti 2014-07-17 02:02:39 UTC
I have tried this this issue and has been reproduced.
Screencast :  http://screencast.com/t/tt6g63udax

Exception Log :    '/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Error executing task LinkAssemblies: error XA2006: Reference to metadata item 'System.Void Android.Animation.AnimatorListenerAdapter::OnAnimationPause(Android.Animation.Animator)' (defined in 'Xamarin.Forms.Platform.Android, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null') from 'Xamarin.Forms.Platform.Android, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' could not be resolved. (Test21385.Android) 

Application Output Log : https://gist.github.com/Shruti360/1d06333a5afbe0aff102

Environment Info :
=== Xamarin Studio ===

Version 5.1.4 (build 0)
Installation UUID: 1a096c6f-0678-402e-89b2-a2c10f7e80e4
Runtime:
	Mono 3.4.0 ((no/954ed3c)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 304000214

=== Apple Developer Tools ===

Xcode 5.1.1 (5085)
Build 5B1008

=== Xamarin.iOS ===

Version: 7.2.5.5 (Enterprise Edition)
Hash: 87026b6
Branch: 
Build date: 2014-07-02 19:39:08-0400

=== Xamarin.Mac ===

Version:

=== Xamarin.Android ===

Version: 4.12.6 (Enterprise Edition)
Android SDK: /Users/360_macmini/Desktop/android-sdk-macosx
	Supported Android versions:
		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)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

=== Build Information ===

Release ID: 501040000
Git revision: 7d45bbe2ee22625f125d0c52548524f02d005cca
Build date: 2014-07-14 12:15:53-04
Xamarin addins: c78f1d88e57baa928aeee1484d96e6f8edf8de33

=== Operating System ===

Mac OS X 10.9.4
Darwin ShrutiMac.local 13.3.0 Darwin Kernel Version 13.3.0
    Tue Jun  3 21:27:35 PDT 2014
    root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
Comment 2 Brendan Zagaeski (Xamarin Team, assistant) 2014-09-24 16:27:19 UTC
Bug for the incorrect TargetFrameworkVersion in the Xamarin Studio templates filed here:
https://bugzilla.xamarin.com/show_bug.cgi?id=22182
Comment 3 Lluis Sanchez 2014-09-25 04:05:06 UTC
Fixed in 5.7.0.244.
Comment 4 Lluis Sanchez 2014-09-25 14:36:48 UTC
*** Bug 20061 has been marked as a duplicate of this bug. ***
Comment 5 Lluis Sanchez 2014-09-25 17:36:55 UTC
Also fixed in 5.5.0.221.
Comment 6 Sunil Kumar 2014-09-26 07:34:03 UTC
I have checked this issue and observe that if we run the 'Blank App (Xamarin.Forms Portable)/Blank App (Xamarin.Forms Shared)' project in release mode with default settings then it works fine. But if we run these both projects in release mode with android target other than kitkat(less than Android4.4) then it gives error: https://gist.github.com/sunil360/9d2c9b1c91ecc6592bd0

NOTE: We are getting the same behavior in VS with XVS 3.7.151.

Please let us know is it intended fix?

Environment info:
MAC:
XS 5.5.0.221
X.Android 4.18.0.32

Windows:
XS 5.5.0.221
XVS 3.7.151
Comment 7 Sunil Kumar 2014-10-01 14:05:06 UTC
We are not able to run 'Blank App (Xamarin.Forms Portable)/Blank App (Xamarin.Forms Shared)' project in release mode with android target other than kitkat(less than Android4.4).

Please let us know is it intended fix?

So I am reopening this issue.
Comment 8 Lluis Sanchez 2014-10-03 10:26:07 UTC
Yes, this is the intended fix.
Comment 9 Parmendra Kumar 2015-02-19 14:13:08 UTC
I have checked this issue and not its working fine.

Hence I am closing this issue:

Environment info:

=== Xamarin Studio ===

Version 5.7.1 (build 17)
Installation UUID: 1a096c6f-0678-402e-89b2-a2c10f7e80e4
Runtime:
	Mono 3.12.0 ((detached/de2f33f)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000076

=== Apple Developer Tools ===

Xcode 6.1.1 (6611)
Build 6A2008a

=== Xamarin.iOS ===

Version: 8.6.1.20 (Business Edition)
Hash: 3b3ef43
Branch: 
Build date: 2015-01-24 09:42:21-0500

=== Xamarin.Mac ===

Version: 1.11.0.1 (Business Edition)

=== Xamarin.Android ===

Version: 4.20.0.40 (Business Edition)
Android SDK: /Users/360_macmini/Desktop/android-sdk-macosx
	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)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

=== Build Information ===

Release ID: 507010017
Git revision: 0bc7d3550b6b088ac25b08dcf7bbe73bcc8658b3
Build date: 2015-02-03 19:43:29-05
Xamarin addins: f7b7d34419c9ec24501bfa7c658e80a6305613e0

=== Operating System ===

Mac OS X 10.9.4
Darwin ShrutiMac.local 13.3.0 Darwin Kernel Version 13.3.0
    Tue Jun  3 21:27:35 PDT 2014
    root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64