You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
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
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
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?
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
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?
Activity
VisualMelon commentedon Jan 11, 2022
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?
SandeepChorge commentedon Jan 12, 2022
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
janusw commentedon Jan 11, 2023
In fact OxyPlot.Xamarin.Forms version 2.1.0 was released yesterday, so you could check if upgrading helps.
janusw commentedon Jan 13, 2023
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?