to create mock data from Json for Compose Previews and I’m getting this error. Has anyone experienced this?
TIA
Copy code
java.lang.NoSuchFieldError: Companion
at com.apollographql.apollo3.api.json.BufferedSourceJsonReader.<clinit>(BufferedSourceJsonReader.kt:855)
b
bod
07/11/2023, 7:52 AM
hmm it doesn't ring a bell, but looks like proguard/r8 issue? Which version of Apollo Kotlin are you on?
g
goku
07/12/2023, 1:48 AM
The app builds/works fine. This happens for Previews in Compose.
v3.8.1
I’ve seen this error being reported on Github and it was caused by version conflict between Okhttp I believe. But the problem here is that it works fine when you run the project but fails in the Preview window.
b
bod
07/12/2023, 7:58 AM
Oooh specific to previews hmmm. I just tried in the Apollo tutorial, and it seems to work for me (Apollo v3.8.2, Android Studio 2022.2.1 Flamingo). Are you doing something similar to this?