question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Linker error on AppCenter

See original GitHub issue

Description

Linker problem while compiling app on AppCenter

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2053,5): error MSB4018: The "LinkAssemblies" task failed unexpectedly. [/Users/vsts/agent/2.154.1/work/1/s/ClubeRed/ClubeRed.Android/ClubeRed.Android.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2053,5): error MSB4018: Mono.Linker.MarkException: Error processing method: 'System.Void FFImageLoading.Svg.Platform.SKSvg::ReadTextElement(System.Xml.Linq.XElement,FFImageLoading.Svg.Platform.SKText,SkiaSharp.SKTextAlign,System.Single,SkiaSharp.SKPaint,SkiaSharp.SKPaint)' in assembly: 'FFImageLoading.Svg.Platform.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.String System.String::TrimStart() [/Users/vsts/agent/2.154.1/work/1/s/ClubeRed/ClubeRed.Android/ClubeRed.Android.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2053,5): error MSB4018:   at Mono.Linker.Steps.MarkStep.HandleUnresolvedMethod (Mono.Cecil.MethodReference reference) [0x00013] in <c304dcc9c82e4174bfeded58a523ee7b>:0  [/Users/vsts/agent/2.154.1/work/1/s/ClubeRed/ClubeRed.Android/ClubeRed.Android.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2053,5): error MSB4018:   at Mono.Linker.Steps.MarkStep.MarkMethod (Mono.Cecil.MethodReference reference) [0x0004a] in <c304dcc9c82e4174bfeded58a523ee7b>:0  [/Users/vsts/agent/2.154.1/work/1/s/ClubeRed/ClubeRed.Android/ClubeRed.Android.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2053,5): error MSB4018:   at Mono.Linker.Steps.MarkStep.MarkInstruction (Mono.Cecil.Cil.Instruction instruction) [0x00040] in <c304dcc9c82e4174bfeded58a523ee7b>:0  [/Users/vsts/agent/2.154.1/work/1/s/ClubeRed/ClubeRed.Android/ClubeRed.Android.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2053,5): error MSB4018:   at Mono.Linker.Steps.MarkStep.MarkMethodBody (Mono.Cecil.Cil.MethodBody body) [0x00098] in <c304dcc9c82e4174bfeded58a523ee7b>:0  [/Users/vsts/agent/2.154.1/work/1/s/ClubeRed/ClubeRed.Android/ClubeRed.Android.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2053,5): error MSB4018:   at Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x00162] in <c304dcc9c82e4174bfeded58a523ee7b>:0  [/Users/vsts/agent/2.154.1/work/1/s/ClubeRed/ClubeRed.Android/ClubeRed.Android.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2053,5): error MSB4018:   at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x0001b] in <c304dcc9c82e4174bfeded58a523ee7b>:0  [/Users/vsts/agent/2.154.1/work/1/s/ClubeRed/ClubeRed.Android/ClubeRed.Android.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2053,5): error MSB4018:    --- End of inner exception stack trace --- [/Users/vsts/agent/2.154.1/work/1/s/ClubeRed/ClubeRed.Android/ClubeRed.Android.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2053,5): error MSB4018:   at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00047] in <c304dcc9c82e4174bfeded58a523ee7b>:0  [/Users/vsts/agent/2.154.1/work/1/s/ClubeRed/ClubeRed.Android/ClubeRed.Android.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2053,5): error MSB4018:   at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue () [0x0000a] in <c304dcc9c82e4174bfeded58a523ee7b>:0  [/Users/vsts/agent/2.154.1/work/1/s/ClubeRed/ClubeRed.Android/ClubeRed.Android.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2053,5): error MSB4018:   at Mono.Linker.Steps.MarkStep.Process () [0x00102] in <c304dcc9c82e4174bfeded58a523ee7b>:0  [/Users/vsts/agent/2.154.1/work/1/s/ClubeRed/ClubeRed.Android/ClubeRed.Android.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2053,5): error MSB4018:   at Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context) [0x0000d] in <c304dcc9c82e4174bfeded58a523ee7b>:0  [/Users/vsts/agent/2.154.1/work/1/s/ClubeRed/ClubeRed.Android/ClubeRed.Android.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2053,5): error MSB4018:   at MonoDroid.Tuner.MonoDroidMarkStep.Process (Mono.Linker.LinkContext context) [0x0000b] in <c304dcc9c82e4174bfeded58a523ee7b>:0  [/Users/vsts/agent/2.154.1/work/1/s/ClubeRed/ClubeRed.Android/ClubeRed.Android.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2053,5): error MSB4018:   at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x0001c] in <c304dcc9c82e4174bfeded58a523ee7b>:0  [/Users/vsts/agent/2.154.1/work/1/s/ClubeRed/ClubeRed.Android/ClubeRed.Android.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2053,5): error MSB4018:   at MonoDroid.Tuner.Linker.Run (Mono.Linker.Pipeline pipeline, Mono.Linker.LinkContext context) [0x00000] in <c304dcc9c82e4174bfeded58a523ee7b>:0  [/Users/vsts/agent/2.154.1/work/1/s/ClubeRed/ClubeRed.Android/ClubeRed.Android.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2053,5): error MSB4018:   at MonoDroid.Tuner.Linker.Process (MonoDroid.Tuner.LinkerOptions options, Mono.Linker.ILogger logger, Mono.Linker.LinkContext& context) [0x00071] in <c304dcc9c82e4174bfeded58a523ee7b>:0  [/Users/vsts/agent/2.154.1/work/1/s/ClubeRed/ClubeRed.Android/ClubeRed.Android.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2053,5): error MSB4018:   at Xamarin.Android.Tasks.LinkAssemblies.Execute (Java.Interop.Tools.Cecil.DirectoryAssemblyResolver res) [0x002d4] in <c304dcc9c82e4174bfeded58a523ee7b>:0  [/Users/vsts/agent/2.154.1/work/1/s/ClubeRed/ClubeRed.Android/ClubeRed.Android.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2053,5): error MSB4018:   at Xamarin.Android.Tasks.LinkAssemblies.Execute () [0x0021f] in <c304dcc9c82e4174bfeded58a523ee7b>:0  [/Users/vsts/agent/2.154.1/work/1/s/ClubeRed/ClubeRed.Android/ClubeRed.Android.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2053,5): error MSB4018:   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00023] in <2338fdb301034c1d9c6b95e564d514b0>:0  [/Users/vsts/agent/2.154.1/work/1/s/ClubeRed/ClubeRed.Android/ClubeRed.Android.csproj]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2053,5): error MSB4018:   at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteInstantiatedTask>d__26.MoveNext () [0x00212] in <2338fdb301034c1d9c6b95e564d514b0>:0  [/Users/vsts/agent/2.154.1/work/1/s/ClubeRed/ClubeRed.Android/ClubeRed.Android.csproj]
Done Building Project "/Users/vsts/agent/2.154.1/work/1/s/ClubeRed/ClubeRed.Android/ClubeRed.Android.csproj" (PackageForAndroid target(s)) -- FAILED.

Linker configured for Sdk Assemblies Only in Android build options

I can’t share code because it’s a customer app, sorry.

Information: Visual Studio 2019 - v16.1.5 FFImageLoading (all 5 nugets) - v2.4.11.982 Xamarin.Forms - v3.6.0.344457

Thank you.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
hugodantascommented, Jul 13, 2019

Problem solved.

I was compiling with Xamarin.Android 9.0 on AppCenter and the version must be Xamarin.Android 9.2

Thank you.

1reaction
JajaHarriscommented, Feb 17, 2020

@hugodantas Experiencing a similar issue and your comments gave me an aha moment in the right direction. For me it was just a matter of updating the AppCenter Crash and Analytics packages. Thanks for sharing!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Maui-ios Adding appcenter to MAUI default project throws ...
I have added the appcenter latest nuget and the application failed to run in device throwing a link error. Only adding the nuget...
Read more >
App Center Errors - Visual Studio
App Center Errors allow you to handle the errors in your app and avoid potential issues in your app. This section examines how...
Read more >
iOS Build Troubleshooting - Visual Studio App Center
The likely cause of this error is the linking type of Apple Mach-O Linker isn't set to static library. To successfully build and...
Read more >
SwiftUI Preview Linker error | Apple Developer Forums
When preparing the project file, we ran into a linker error when using SwiftUI previews. The error was caused in the AppCenter framework...
Read more >
Linker command failed with exit code 1 (use -v to see ...
The only issue I have is when I wanted to build my app with app center. Android version is built without any issues...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found