Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrated Xamarin.Android to .NET Android and Oxyplot Xamarin no longer working #149

Open
AndreCL opened this issue Jun 10, 2024 · 4 comments

Comments

@AndreCL
Copy link

AndreCL commented Jun 10, 2024

I upgraded a Xamarin.Android project to .NET Android (7.0) as recommended by Microsoft now that xamarin went out of support last month.

I get the following error:
##[error]The nuget command failed with exit code(1) and error(NU1202: Package OxyPlot.Xamarin.Android 1.0.0 is not compatible with net70-android33.0 (.NETFramework,Version=v7.0,Profile=android33.0). Package OxyPlot.Xamarin.Android 1.0.0 supports: monoandroid10 (MonoAndroid,Version=v1.0)

I tried adding both the oxyplot Forms and the oxyplot MAUI nugets instead, but they fail as target needs to be windows.

Any solutions for Xamarin.Android apps migrated to .NET Android?

@johnjore
Copy link

johnjore commented Oct 3, 2024

Me too post!

Upgraded my xamarin.android to maui (.android?!?) and I can't seem to get oxyplot.Maui to work the way xamarin.android worked. Any possibility of making the required changes to the xamarin.android package to work with native platforms in the MAUI world now that xamarin is dead?

@AndreCL
Copy link
Author

AndreCL commented Oct 3, 2024

Hi @johnjore (and everyone else with the issue)
After trying a number of recommendations, I found one nuget package that can be used to replace it:
https://www.nuget.org/packages/Tnn.OxyPlot.Xamarin.Android/2.1.2
Currently using this one and it works

@johnjore
Copy link

johnjore commented Oct 3, 2024

Thanks for the heads up, but not being a developer, I dont really understand what the difference is between the Tnn version and the "original" when I look at the Tnn make file: https://github.com/trinnguyen/xamarin-bindings/blob/master/OxyPlot.Xamarin.Android/Makefile

To me it looks like it clones the original Xamarin.Android and compiles it and then pushes it to nuget? Not sure what it actually changes?!?

Sadly, I'm on .NET 8 and Android 34, and I get nothing when I use the example code (view is not populated with anything): https://oxyplot.readthedocs.io/en/latest/getting-started/hello-xamarin-android.html

Just as blank as everything that used microcharts.android (after upgrading to MAUI)

Maybe I need to try and clone the project locally and bump the .NET version to 8 and see what happens. I've requested access to the Syncfusion community edition as graphs and MAUI (Android) is as rare as $3 notes 😥

@johnjore
Copy link

johnjore commented Oct 3, 2024

@AndreCL,

Cloning the repo locally, and updating the Tnn version of the (SDK) project file to net8, and I now have the demo project in my fragment. Happy days and thanks for the pointer!

    <TargetFramework>net8.0-android</TargetFramework>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants