Microcharts icon indicating copy to clipboard operation
Microcharts copied to clipboard

[Bug] Microcharts.Maui 1.0.0 Does not work in .NET MAUI 8

Open tusharsjagdale opened this issue 1 year ago • 6 comments
trafficstars

Describe the bug Microcharts.Maui 1.0.0 Does not rebuild in .NET MAUI 8 for Android platform

Which platform and version is this for? Android

To Reproduce Steps to reproduce the behavior:

  1. Add reference of Microcharts.Maui 1.0.0 in MAUI 8 Project
  2. Rebuild for Android Platform
  3. See error

Expected behavior It should rebuild successful for android platform

Screenshots image

tusharsjagdale avatar Nov 22 '23 13:11 tusharsjagdale

I don't think this is an issue with Microcharts. I'll randomly get this error when trying to build a MAUI.NET 8 app on my machine, yet it never happens in a clean CI build. I think this is some weird build caching issue. The library is working with MAUI.NET 8 for me.

Ghostbird avatar Dec 15 '23 13:12 Ghostbird

.Net Maui on .net 8 Testing on local android 11 -API 30 device. (It works fine on .net-7)

image ^

@tusharsjagdale : There is a wa for ur problem here

Legends avatar Dec 16 '23 11:12 Legends

Ok, I solved it by adding a reference to SkiaSharp.Views.Maui.Controls 2.88.6 to my application. Ref

Legends avatar Dec 16 '23 17:12 Legends

also faced this problem, please help on how i can solve it for .net8. when i install the microcharts.maui nugget package, i immadiately encounter a warning on the transitive skiasharp package (vulnerable), even if i update the skiasharp to the latest stable, its not solving those android resource errors

prosperkmurau avatar Dec 18 '23 13:12 prosperkmurau

@Legends thank you for your hint. I solved too in this way, but it is best to improve the Microcharts.Maui package so that it adds all the necessary libraries on its own.

sulmar avatar Dec 29 '23 18:12 sulmar

It works in Maui net8, but the installation is a bit finnicky. Use https://github.com/PickleBurg/ImageSource-Memory-Leak branch chart-stuff as a path to fix it (especially if you do MVVM toolkit)

The biggest issue aside for the Skia dependency is the type declaration :

[ObservableProperty] private LineChart myChart;

Also use the

<charts:ChartView Chart="{Binding MyChart}" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" />

to bind to the VM

mdelgadov avatar Aug 11 '24 11:08 mdelgadov