Comments (30)
Have the same issue.
Xamarin Forms: 3.6.0.344457
Xfx.Controls: 1.2.1
Android libraries: 28.0.0.1
Error:
The "LinkAssemblies" task failed unexpectedly.
Mono.Linker.MarkException: Error processing method: 'System.Void Xfx.Controls.Droid.Renderers.XfxCardViewRendererDroid::Xamarin.Forms.Platform.Android.IVisualElementRenderer.add_LayoutChange(System.EventHandler1<Android.Views.View/LayoutChangeEventArgs>)' in assembly: 'Xfx.Controls.Droid.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void Xamarin.Forms.Platform.Android.IVisualElementRenderer::add_LayoutChange(System.EventHandler
1<Android.Views.View/LayoutChangeEventArgs>)
at Mono.Linker.Steps.MarkStep.HandleUnresolvedMethod(MethodReference reference)
at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference)
at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
at Mono.Linker.Steps.MarkStep.ProcessQueue()
--- End of inner exception stack trace ---
at Mono.Linker.Steps.MarkStep.ProcessQueue()
at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
at Mono.Linker.Steps.MarkStep.Process()
at MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context)
at Mono.Linker.Pipeline.Process(LinkContext context)
at MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context)
at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
at Xamarin.Android.Tasks.LinkAssemblies.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() Project.Forms.Android
from xfx.controls.
That's a new class in 1.1.3.
Just to confirm, have you called the Init()
method in your Android Main Activity?
https://github.com/XamFormsExtended/Xfx.Controls/blob/master/example/Xfx.Controls.Example.Droid/MainActivity.cs#L14
from xfx.controls.
Yes, but it's the compilation process that fails; not the actual app running. We don't get that far.
from xfx.controls.
did you try a full clean/rebuild in RELEASE? I wonder if there's a dll mismatch after the update?
from xfx.controls.
yes I did.
from xfx.controls.
so if the issue is at compile time, then it's not the Linker. What happens is that the linker strips classes during compile time so that at runtime they're no longer there (ie: linker issues will cause runtime crashes). I'm leaning more to a dll mismatch.
Make sure you've done the following.
Clean > Close Visual Studio > delete all obj + bin directories > Open Visual Studio > Rebuild
I'm trying to reproduce, but cannot.
from xfx.controls.
Alternatively, if you can send me a repro, I'll take a look.
from xfx.controls.
give me a bit to completely clean the solution as well as deleting the contents of the "packages" folder in case the dll mismatch is coming from nuget.
from xfx.controls.
does 1.1.3 require xamarin forms 2.5, by any chance?
from xfx.controls.
I've cleaned everything out and still get the linker error. Could it be something with the target android framework version?
from xfx.controls.
all my xamarin.android.support.* packages are v26.1.0.1.
from xfx.controls.
I wonder if it makes a difference what the support packages are? Here's what I'm using.
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Xamarin.Android.Support.Animated.Vector.Drawable" version="25.4.0.2" targetFramework="monoandroid80" />
<package id="Xamarin.Android.Support.Annotations" version="25.4.0.2" targetFramework="monoandroid80" />
<package id="Xamarin.Android.Support.Compat" version="25.4.0.2" targetFramework="monoandroid80" />
<package id="Xamarin.Android.Support.Core.UI" version="25.4.0.2" targetFramework="monoandroid80" />
<package id="Xamarin.Android.Support.Core.Utils" version="25.4.0.2" targetFramework="monoandroid80" />
<package id="Xamarin.Android.Support.Design" version="25.4.0.2" targetFramework="monoandroid80" />
<package id="Xamarin.Android.Support.Fragment" version="25.4.0.2" targetFramework="monoandroid80" />
<package id="Xamarin.Android.Support.Media.Compat" version="25.4.0.2" targetFramework="monoandroid80" />
<package id="Xamarin.Android.Support.Transition" version="25.4.0.2" targetFramework="monoandroid80" />
<package id="Xamarin.Android.Support.v4" version="25.4.0.2" targetFramework="monoandroid80" />
<package id="Xamarin.Android.Support.v7.AppCompat" version="25.4.0.2" targetFramework="monoandroid80" />
<package id="Xamarin.Android.Support.v7.CardView" version="25.4.0.2" targetFramework="monoandroid80" />
<package id="Xamarin.Android.Support.v7.MediaRouter" version="25.4.0.2" targetFramework="monoandroid80" />
<package id="Xamarin.Android.Support.v7.Palette" version="25.4.0.2" targetFramework="monoandroid80" />
<package id="Xamarin.Android.Support.v7.RecyclerView" version="25.4.0.2" targetFramework="monoandroid80" />
<package id="Xamarin.Android.Support.Vector.Drawable" version="25.4.0.2" targetFramework="monoandroid80" />
<package id="Xamarin.Forms" version="2.5.0.121934" targetFramework="monoandroid71" />
</packages>
from xfx.controls.
hmmm... let me see if I can downgrade my support libraries and target framework and see what that does
from xfx.controls.
Getting the same problem... How can I help you to find the issue?
Edit : updated to v.26 but now it's failing on Baseflow/XamarinMediaManager#278, I don't get the XFX's error anymore, but I don't know if it's just not displayed because XamarinMediaManager fails first. Disabling the linker for now :/ ...
from xfx.controls.
Also have this problem with linking.
Our only alternative right now is using a native implementation for android.
Why doesn't linkskip work for this plugin?
from xfx.controls.
Anyone running into this, please post your stacktrace.
from xfx.controls.
We are using the XfxControls package in a Xamarin.Forms app (Droid and iOS). The Xamarin Forms version is 3.6.0.293080. When we try to compile our primary Droid platform project, we get a build error that the "LinkAssemblies task failed unexpectedly." The actual build error is quoted below. When we build the project in "Debug" mode, it works fine. If we select "Don't Link" in the Linker Behavior section of the Droid project options in the Release configuration, the build completes.
Version Number of Control: 1.1.3 / 1.2.1
Device Tested On: Debug Working
Simulator Tested On: N/A
Affects
iOS - Not Tested Yet
Android (Min version API19, target version API28, Xamarin Android version 9, SDK Tools version 26.1.1, SDK Platform Tools version 28.0.1, SDK Build Tools version 27.0.3)
Expected Behavior
Project compiles without any linker errors
Actual Behavior
Droid project compilation fails with linker exception like this:
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: The "LinkAssemblies" task failed unexpectedly.
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: Mono.Linker.MarkException: Error processing method: 'System.Void Xfx.Controls.Droid.Renderers.XfxCardViewRendererDroid::Xamarin.Forms.Platform.Android.IVisualElementRenderer.add_LayoutChange(System.EventHandler1<Android.Views.View/LayoutChangeEventArgs>)' in assembly: 'Xfx.Controls.Droid.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void Xamarin.Forms.Platform.Android.IVisualElementRenderer::add_LayoutChange(System.EventHandler
1<Android.Views.View/LayoutChangeEventArgs>)
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at Mono.Linker.Steps.MarkStep.HandleUnresolvedMethod(MethodReference reference)
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference)
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at Mono.Linker.Steps.MarkStep.ProcessQueue()
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: --- End of inner exception stack trace ---
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at Mono.Linker.Steps.MarkStep.ProcessQueue()
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at Mono.Linker.Steps.MarkStep.Process()
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context)
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at Mono.Linker.Pipeline.Process(LinkContext context)
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context)
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at Xamarin.Android.Tasks.LinkAssemblies.Execute()
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()
from xfx.controls.
any news? I have the same issue as @hemantramu
from xfx.controls.
I have the same issue as @hemantramu Any news? Thanks
from xfx.controls.
No news yet, would love a repro that I can run to see.
from xfx.controls.
would anyone be willing to test a fix for me?
from xfx.controls.
Hello! Getting the same problem...
from xfx.controls.
would anyone be willing to test a fix for me?
I would. Just let me know how. Thanks.
Edit: I should say that i saw your PR and figure that was the fix, and I'm happy to test whatever, just need some guidance as to the best way to build and integrate it into my project.
from xfx.controls.
would anyone be willing to test a fix for me?
Hi,
I have created a solution with the latest versions of Xamarin and xfx.Control.
It keeps giving error when compiling in release. I attached the project link.
https://drive.google.com/file/d/1Z9f0moaU_qkGM1RKlbtzG1oIwEuw-PcY/view?usp=sharing
from xfx.controls.
Any update on this? Seems like many have been having the same issue for a while.
from xfx.controls.
Same issue, haven't found a solution yet
from xfx.controls.
With newer version of Xamarin there is and issue between system drawing color and xamarin forms color. Only solution is to download source upgrade packages, fix this issue and reference dll locally to your project.
from xfx.controls.
Hi everyone.
I have the same issue:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2056,5): error XALNK7000: Mono.Linker.MarkException: Error processing method: 'System.Void Xfx.Controls.Droid.Renderers.XfxCardViewRendererDroid::Xamarin.Forms.Platform.Android.IVisualElementRenderer.add_LayoutChange(System.EventHandler1<Android.Views.View/LayoutChangeEventArgs>)' in assembly: 'Xfx.Controls.Droid.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void Xamarin.Forms.Platform.Android.IVisualElementRenderer::add_LayoutChange(System.EventHandler
1<Android.Views.View/LayoutChangeEventArgs>)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2056,5): error XALNK7000: at Mono.Linker.Steps.MarkStep.HandleUnresolvedMethod(MethodReference reference)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2056,5): error XALNK7000: at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2056,5): error XALNK7000: at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2056,5): error XALNK7000: at Mono.Linker.Steps.MarkStep.ProcessQueue()
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2056,5): error XALNK7000: --- End of inner exception stack trace ---
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2056,5): error XALNK7000: at Mono.Linker.Steps.MarkStep.ProcessQueue()
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2056,5): error XALNK7000: at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2056,5): error XALNK7000: at Mono.Linker.Steps.MarkStep.Process()
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2056,5): error XALNK7000: at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2056,5): error XALNK7000: at MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2056,5): error XALNK7000: at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2056,5): error XALNK7000: at Mono.Linker.Pipeline.Process(LinkContext context)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2056,5): error XALNK7000: at MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2056,5): error XALNK7000: at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2056,5): error XALNK7000: at Xamarin.Android.Tasks.LinkAssemblies.RunTask()
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2056,5): error XALNK7000: at Xamarin.Android.Tasks.AndroidTask.Execute()
Someone has found any solution ?
from xfx.controls.
Install 1.0.4 version and then remove bin/obj and then rebuild. It's work for me
from xfx.controls.
Thank you ShivamSingh1. It worked. Thank you so much.
from xfx.controls.
Related Issues (20)
- UWP Support HOT 1
- xfxEntry problem with Focus HOT 1
- Nuget update HOT 1
- Xfx Entry Readonly error
- Xfx ComboBox Gaps between list items
- Red Block appears behind CardView
- Completed event and ReturnCommand do not work
- How to make sorting algorithm async so it won't block the UI?
- Conflict with method PopToRoot of INavigation
- It doesn't seem the control works when in DataTemplate of repeating control. HOT 1
- xfx:entry ClearButtonVisibility
- problem with Combo : when typing digits HOT 2
- XfxCombobox =>suggestion not showing when user enter only single character HOT 3
- Show List When Xfx.Combobox clicked HOT 1
- XfxComboBox suggestion list not showing HOT 1
- xfxEntry problem with ReturnType HOT 27
- Build issue in Release mode (Linking SDK Assemblies) HOT 19
- XML documentation file missing from NuGet package
- On mainpage change I got error Object reference not set to an instance of an object HOT 11
- Maxlength is not working on XfxEntry HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xfx.controls.