Hey folks, I'm getting this `This declaration is o...
# serialization
g
Hey folks, I'm getting this
This declaration is opt-in and its usage should be marked with  '@kotlinx. serialization. InternalSerializationApi' or '@OptIn(markerClass = kotlinx. serialization. InternalSerializationApi. class)'
warning on all of my data models marked with Kotlinx serialization's
@Serializable
annotation. Seems like a pointless / incorrect warning as my app works fine despite these warnings, and it would require me to mark every file with the
@OptIn
annotation. I found this Github issue for the problem but the suggested fix to enable K2 mode did not work (already had K2 enabled.) IMO this issue should be re-opened, or does anyone have any other recommendations to fix? Kotlin version: 1.9.0
g
Yes, if you read my above message you'll see that I linked that issue and stated that the suggested solution does not fix for me:
I found this Github issue for the problem but the suggested fix to enable K2 mode did not work (already had K2 enabled.)
g
Did you find a solution for this? I've been facing it for a while and it's pretty annoying. I also have K2 enabled. If I disable it, I get this, even though the plugin is applied to the module:
d
K2 support in IDE is not great so it’s good workaround for now
271 Views