tehras / charts

Simple Android compose charts.
Apache License 2.0
682 stars 63 forks source link

java.lang.NoSuchFieldError: No field Fill of type Landroidx/compose/ui/graphics/PaintingStyle #27

Open Javicompi opened 2 years ago

Javicompi commented 2 years ago

App compiles, but crashes when tries to show the LineChart. I updated Compose version to 1.0.4, and still get it.

java.lang.NoSuchFieldError: No field Stroke of type Landroidx/compose/ui/graphics/PaintingStyle; in class Landroidx/compose/ui/graphics/PaintingStyle; or its superclasses (declaration of 'androidx.compose.ui.graphics.PaintingStyle' appears in /data/app/~~1IClg3K24qqTN_iqrjdXRg==/es.jnsoft.whatweath-pLHYJOTf4GaonKm_ukZsTg==/base.apk) at com.github.tehras.charts.line.renderer.line.SolidLineDrawer.(SolidLineDrawer.kt:14) at com.github.tehras.charts.line.renderer.line.SolidLineDrawer.(Unknown Source:0) at com.github.tehras.charts.line.renderer.line.SolidLineDrawer.(SolidLineDrawer.kt:8)

Edited:

I meant, my project was using Compose 1.0.1, and had the same issue.

ociler commented 2 years ago

Did you find any solution? I have the same issue.

Javicompi commented 2 years ago

I didn't. Just implemented it on my own. Not as difficult as I thought in Compose.

ociler commented 2 years ago

Could you help me on this? I don't even know how to start :'(

Javicompi commented 2 years ago

What I did was to adapt what I found in this article:

https://proandroiddev.com/building-your-first-custom-chart-in-android-with-jetpack-compose-a890fb60878b

I didn't need something too fancy anyway.

ociler commented 2 years ago

Yes, I checked that article too. I will try something like that. Thank you so much!!

Javicompi commented 2 years ago

Go for it. Might seem complicated. But as I said, with Compose is not that difficult.