Closed proninyaroslav closed 1 year ago
And after the project upgrade of after the release of Android Studio Flamingo, my old hack doesn't work even on version 0.19.0:
-keep @com.squareup.moshi.JsonClass class *
-keep @com.squareup.moshi.JsonClass interface *
Can you make a minimally reproducible sample project?
I updated the dependencies in the old example and also fixed the build config that didn't allow testing then https://github.com/proninyaroslav/moshi_sealed_R8_crash
The problem is reproduced in it with 0.22.0
version.
There's no readme there. What are the exact steps please?
Everything is in the MainActivity.kt file. Just install the app on the device and run it, the crash will happen immediately.
Figured it out, thanks for the repro. See #413, you should also be able to paste that proguard rule to work around locally for now
Works fine, thank you.
Kotlin: 1.8.20 KSP: 1.8.20-1.0.10 Android libray: 8.0.0 Moshi: 1.14.0 moshi_sealed: 1.22.0
Faced the same problem again on version
0.22.0
: https://github.com/ZacSweers/MoshiX/issues/324. I couldn't test this on version0.21.0
due to a build error (https://github.com/ZacSweers/MoshiX/issues/392).Log
```console java.lang.IllegalArgumentException: No JsonAdapter for interface org.proninyaroslav.opencomicvine.data.preferences.PrefWikiCharactersFilter$Name (with no annotations) for interface org.proninyaroslav.opencomicvine.data.preferences.PrefWikiCharactersFilter$Name name for class org.proninyaroslav.opencomicvine.data.preferences.PrefWikiCharactersFilterBundle at com.squareup.moshi.Moshi$LookupChain.exceptionWithLookupStack(SourceFile:82) at com.squareup.moshi.Moshi.adapter(SourceFile:31) at org.proninyaroslav.opencomicvine.data.preferences.PrefWikiCharactersFilterBundleJsonAdapter.