Closed anchithAcharya closed 1 month ago
Hi @anchithAcharya, we ran your code and we didn't experience the exception. It seems to be a build cache issue. It should disappear when you rebuild the project. However, the preview will remain blank, as Compose previews don't support asynchronous execution (CartesianChartModelProducer
runs off the main thread). We'll check if we can move the execution to the main thread for Compose previews. In the meantime, you can create the model synchronously for the preview.
Since this is not entirely a bug, I'm converting this to a discussion.
How to reproduce
Run the following code in an android project with Jetpack Compose set up:
Observed behavior
Preview fails to load, giving the following exception:
java.lang.ClassNotFoundException: com.patrykandpatrick.vico.core.cartesian.data.CartesianChartModelProducer
Expected behavior
Preview should be visible
Vico version(s)
2.0.0-alpha.23
Android version(s)
SDK version 34, minSDK 30
Additional information
No response