1

When I build my Xamarin Android App in release mode, I get this error:

/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 Xamarin.Forms.Entry::set_FontSize(System.Double)' (defined in 'MyApp, Version=1.0.5942.24429, Culture=neutral, PublicKeyToken=null') from 'MyApp, Version=1.0.5942.24429, Culture=neutral, PublicKeyToken=null' could not be resolved. (MyApp.Droid)

When I build it in Debug mode, it builds fine.

I've cleaned my project and updated Xamarin Studio (Xamarin.Android 6.0.3) ... how can I start to dig into finding the cause of this issue?

Claudius
  • 1,883
  • 2
  • 21
  • 34
Chet at C2IT
  • 549
  • 6
  • 21

1 Answers1

0

Set your Minimum Android to target API 15 or higher. Ensure that all APIs you cover within your Min/Max API level are present in your Android SDK manager.

See this for additional information:

https://forums.xamarin.com/discussion/17929/error-executing-task-linkassemblies-for-android-release-build

ClintL
  • 1,424
  • 14
  • 30
  • I was already on API 15... I moved it up to 21 and that didn't work, either. My minimum Android version is set to 15, Targeted Android version is set to 23. Changing the linker behavior to "don't link" did the trick, though... is that a bad thing? (it's not a big app, so size isn't a huge issue) – Chet at C2IT Apr 08 '16 at 18:35
  • Did you reference any dlls that use namespaces not within the PCLs .NET coverage? Dont link is not such a bad thing but apps should work with link sdk only set and it does start to make a big difference when the app gets bigger and 'unused' namespaces are not stripped out. – ClintL Apr 09 '16 at 00:06
  • Every thing I find on this subject refers to the same cause https://forums.xamarin.com/discussion/24845/linkassemblies-task-failed-unexpectedly (api target) http://stackoverflow.com/questions/28424308/the-linkassemblies-task-failed-unexpectedly (api target) is Xamarin.Forms referenced within the 'project' you are using the entry control in. I could think of an issue with using entry in a windows phone app but actually using the windows native entry rather than the xamforms wrapper of entry and when it strips links in 'release' mode forms or the native whichever is being used gets stripped out – ClintL Apr 09 '16 at 00:14