We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Error MSB4018: The "LinkAssemblies" task failed unexpectedly

Thread ID:

Created:

Updated:

Platform:

Replies:

121607 Jan 6,2016 09:54 PM Jan 18,2016 04:03 AM Android 6
loading
Tags: SfChart
Anthony Ramirez
Asked On January 6, 2016 09:54 PM

Hi,

Is there any advice on how to resolve the following build error, when setting the linker to Link SDK Assemblies.  This error does not occur when Linker is off.

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(5,5): Error MSB4018: The "LinkAssemblies" task failed unexpectedly.
Xamarin.Android.XamarinAndroidException: error XA2006: Reference to metadata item 'System.Void Java.Interop.JavaTypeParametersAttribute::.ctor(System.String[])' (defined in 'Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null') from 'Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' could not be resolved. ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void Java.Interop.JavaTypeParametersAttribute::.ctor(System.String[])
   at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference)
   at Mono.Linker.Steps.MarkStep.MarkCustomAttribute(CustomAttribute ca)
   at Mono.Linker.Steps.MarkStep.MarkCustomAttributes(ICustomAttributeProvider provider)
   at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
   at MonoDroid.Tuner.MonoDroidMarkStep.MarkType(TypeReference reference)
   at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
   at MonoDroid.Tuner.MonoDroidMarkStep.MarkType(TypeReference reference)
   at Mono.Linker.Steps.MarkStep.InitializeType(TypeDefinition type)
   at Mono.Linker.Steps.MarkStep.InitializeAssembly(AssemblyDefinition assembly)
   at Mono.Linker.Steps.MarkStep.Initialize()
   at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
   at Mono.Linker.Pipeline.Process(LinkContext context)
   at MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext& context)
   at Xamarin.Android.Tasks.LinkAssemblies.Execute()
   --- End of inner exception stack trace ---
   at Xamarin.Android.Diagnostic.Error(Int32 code, Exception innerException, String message, Object[] args)
   at Xamarin.Android.Tasks.LinkAssemblies.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() (MSB4018) (ParentLove.Android)


Thanks,
Ant

Magesh Kumar Krishnan [Syncfusion]
Replied On January 7, 2016 06:26 AM

Hi Anthony,

The reported error is not related to our control. Please refer to the following Xamarin.Forms forums to overcome this error

https://forums.xamarin.com/discussion/22358/building-release-version-for-android-failed  

https://forums.xamarin.com/discussion/17929/error-executing-task-linkassemblies-for-android-release-build
 
Regards,
Magesh Kumar K

Anthony Ramirez
Replied On January 7, 2016 08:25 AM

Thanks for the quick reply Magesh.  I'm looking into the posts now :)

Anthony Ramirez
Replied On January 7, 2016 08:34 AM

My first shot at it was not successful.

I also tried by downloading the SampleBrowser-Forms sln and get the same error. 

I'm using SyncFusion v 13.3.0.18

My Xamarin Env:
Xamarin Studio
Version 5.9.7 (build 22)
Installation UUID: 1d8a9232-d5d6-4d00-b378-e7d7d3ad6ebf
Runtime:
 Microsoft .NET 4.0.30319.34209
 GTK+ 2.24.22 (MS-Windows theme)
 GTK# 2.12.26
Xamarin.Android
Version: 5.1.7 (Business Edition)
Android SDK: C:\Users\Anthony\AppData\Local\Android\android-sdk
 Supported Android versions:
  2.3    (API level 10)
  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)
  5.1    (API level 22)
  6.0    (API level 23)
Java SDK: C:\Program Files (x86)\Java\jdk1.7.0_79
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) Client VM (build 24.79-b02, mixed mode, sharing)
Xamarin Android Player
Version: 0.6.5
Location: P:\Program Files\Xamarin Android Player\DeviceManager.exe
Build Information
Release ID: 509070022
Git revision: 6bd1f169df44ca96addf8a035316c535a4fa46fa
Build date: 2015-09-30 10:13:51-04
Xamarin addins: 1c3e5c0859bdfec0ecd481a57ad6c03bc22f5536
Operating System
Windows 6.2.9200.0 (64-bit)

Error Details from SampleBrowser-Forms

Error 8 The "LinkAssemblies" task failed unexpectedly.
Xamarin.Android.XamarinAndroidException: error XA2006: Reference to metadata item 'System.Void Java.Interop.JavaTypeParametersAttribute::.ctor(System.String[])' (defined in 'Syncfusion.SfChart.Android, Version=13.3451.0.18, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89') from 'Syncfusion.SfChart.Android, Version=13.3451.0.18, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89' could not be resolved. ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void Java.Interop.JavaTypeParametersAttribute::.ctor(System.String[])
   at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference)
   at Mono.Linker.Steps.MarkStep.MarkCustomAttribute(CustomAttribute ca)
   at Mono.Linker.Steps.MarkStep.MarkCustomAttributes(ICustomAttributeProvider provider)
   at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
   at MonoDroid.Tuner.MonoDroidMarkStep.MarkType(TypeReference reference)
   at Mono.Linker.Steps.MarkStep.InitializeType(TypeDefinition type)
   at Mono.Linker.Steps.MarkStep.InitializeAssembly(AssemblyDefinition assembly)
   at Mono.Linker.Steps.MarkStep.Initialize()
   at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
   at Mono.Linker.Pipeline.Process(LinkContext context)
   at MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext& context)
   at Xamarin.Android.Tasks.LinkAssemblies.Execute()
   --- End of inner exception stack trace ---
   at Xamarin.Android.Diagnostic.Error(Int32 code, Exception innerException, String message, Object[] args)
   at Xamarin.Android.Tasks.LinkAssemblies.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets 1295 5 SampleBrowser.Droid

Magesh Kumar Krishnan [Syncfusion]
Replied On January 8, 2016 10:03 AM

Hi Anthony,

This issue is not related to our control. This issue occurs due to varius reasons. Anyone of the following process may be resolve your issue,

1. Reinstall the Xamarin nuget.
2. Update the Xamarin and Xamarin.Android to latest version.
3. Compile the app with latest Android sdk version (API 23).

Regards,
Magesh Kumar K

Anthony Ramirez
Replied On January 16, 2016 05:13 PM

Hi Magesh Kumar,

Just wanted to provide an update the upgrading to the latest Xamarin.Android resolve this issue.

Thanks so much for your quick assistance.

Best,
Ant

Suresh B [Syncfusion]
Replied On January 18, 2016 04:03 AM

Hi Anthony,

Thanks for your update.

We are glad to know that your issue had been resolved. Please get back to us if you need any other assistance. 
 
Regards,
Suresh B

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;