Skip to content

Getting this issue while creating a release build in xamarin application, Mono.Linker.MarkException: Error processing method: 'System.Void OxyPlot.Xamarin.Android.PlotView::OnDraw(Android.Graphics.Canvas)' in assembly: 'OxyPlot.Xamarin.Android.dll'  #121

Open

Description

@SandeepChorge

Hii, I am using Oxyplot.core 1.0.0 image

and currently facing issue while creating a release build of the application, getting following error

Severity Code Description Project File Line Suppression State
Error Mono.Linker.MarkException: Error processing method: 'System.Void OxyPlot.Xamarin.Android.PlotView::OnDraw(Android.Graphics.Canvas)' in assembly: 'OxyPlot.Xamarin.Android.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void OxyPlot.IPlotModel::Render(OxyPlot.IRenderContext,System.Double,System.Double)
at Mono.Linker.Steps.MarkStep.HandleUnresolvedMethod(MethodReference reference)
at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference)
at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction)
at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
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 Mono.Linker.Steps.MarkStep.Process(LinkContext context)
at MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context)
at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
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.RunTask()
at Microsoft.Android.Build.Tasks.AndroidTask.Execute() in /Users/builder/azdo/_work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs:line 17 SalesAssist.Android

is there any leads how to solve this issue, I also tried upgrading the nuget version to 2.1.0 still facing same issue

Activity

  1. VisualMelon commented on Jan 11, 2022

    @VisualMelon

    The method doesn't exist in 2.1, and there is no OxyPlot.Xamarin targeting 2.1, so that won't be any help I'm afraid.

    I don't know much about Xamarin, but some mindless googling suggests this may just be a tooling issue that may be resolved by cleaning the solution fully. Are you able to try building the project on a different machine?

  2. SandeepChorge commented on Jan 12, 2022

    @SandeepChorge
    Author

    I tried cleaning and building the project it works just fine but at the time of Release APK creation it gives this error, and somehow my colleague does not get this issue on his System, I'll recheck again if there is any tooling issue

  3. janusw commented on Jan 11, 2023

    @janusw
    Member

    The method doesn't exist in 2.1, and there is no OxyPlot.Xamarin targeting 2.1, so that won't be any help I'm afraid.

    In fact OxyPlot.Xamarin.Forms version 2.1.0 was released yesterday, so you could check if upgrading helps.

  4. janusw commented on Jan 13, 2023

    @janusw
    Member

    Error Mono.Linker.MarkException: Error processing method: 'System.Void OxyPlot.Xamarin.Android.PlotView::OnDraw(Android.Graphics.Canvas)' in assembly: 'OxyPlot.Xamarin.Android.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void OxyPlot.IPlotModel::Render(OxyPlot.IRenderContext,System.Double,System.Double)

    This really looks a lot like 2.0.0 -> 2.1.0 incompatibility: In the course of updating OxyPlot.Xamarin.Forms to be compatible with OxyPlot.Core 2.1.0, I had to update PlotView::OnDraw to call the new Render method, which takes any OxyRect as argument instead of two doubles, see #142 and in particular ad250aa.

    I strongly suspect that this issue will be fixed by updating to OxyPlot.Xamarin.Forms 2.1.0. @SandeepChorge, could you please confirm that this is the case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions