charts icon indicating copy to clipboard operation
charts copied to clipboard

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

Open Javicompi opened this issue 3 years ago • 6 comments

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.

Javicompi avatar Nov 03 '21 17:11 Javicompi

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

ociler avatar Dec 13 '21 19:12 ociler

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

Javicompi avatar Dec 13 '21 22:12 Javicompi

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

ociler avatar Dec 13 '21 22:12 ociler

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.

Javicompi avatar Dec 13 '21 23:12 Javicompi

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

ociler avatar Dec 13 '21 23:12 ociler

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

Javicompi avatar Dec 14 '21 11:12 Javicompi