kotlin-hands-on / kmp-networking-and-data-storage

Other
256 stars 70 forks source link

Kotlinx serializable annotation not found after build project #9

Open rhonyabdullah opened 3 years ago

rhonyabdullah commented 3 years ago

Hello @KaterinaPetrova As you mentioned here i try to checking out "final" branch. Project is well synching, but after execute "build" from android studio any serializable annotation is missing, if i sync the project again serializable appear but if i build the project it become error again, i try every workaround that discussed here but still didn't work

KaterinaPetrova commented 3 years ago

Hey, @rhonyabdullah ! Unfortunately, I can't reproduce your issue. Could you please share with me some details about your environment:

rhonyabdullah commented 3 years ago

Hi, here is:

bagolysz commented 3 years ago

I encountered the same issue. Actually, for me it has been solved by performing an Invalidate Caches and Restart in Android Studio.

rhonyabdullah commented 3 years ago

@bagolysz can you confirm that after you execute build / run the project that error is gone or appear again ?

toth-istvan-zoltan commented 3 years ago

I had the same issue. My suspect is "organise imports". I had IntelliJ automatically organise imports during git commit and it seems like something goes wrong there.

bagolysz commented 3 years ago

@rhonyabdullah

@bagolysz can you confirm that after you execute build / run the project that error is gone or appear again ?

I was not able to consistently reproduce this issue anymore.

rhonyabdullah commented 3 years ago

@bagolysz I'm curious, but did you make an upgrade or use the latest version of this library ? Can you share the dependency version ? So i can learn too, thanks

KaterinaPetrova commented 3 years ago

Hey @rhonyabdullah , are you still having this issue with the latest version of the project? (Check the final branch again please, it was force-pushed with the updated dependencies)

MarkRS-UK commented 3 years ago

Is there any movement on this? I too am now experiencing this problem, it seems to have happened after updating the Kotlin plugin. None of the remedies here or in https://github.com/Kotlin/kotlinx.serialization/issues/73 apply, I think. I was already using the Kotlin DSL, I had not applied "organise imports" (I'm on AS), my versions are

This is happening in my shared module, I have tried to import kotlinx.serializable.Serializable with the same results illustrated at the head of this report. I have also added the plugin to the android module with no improvement. I'm not certain that all dependencies are up to date since AS doesn't report outdated libraries that are specified in the recommended manner of constants in buildsrc (is this ever going to get fixed?), but what else could affect this?

Any thoughts gratefully received.

JendrikDerWeise commented 2 years ago

Hi same problem here like @MarkRS-UK and @rhonyabdullah I have no idea how to get the import to work. In the Android Java part of my project the import and annotation is working. Only the Kotlin "shared" part seems to be a problem.

rhonyabdullah commented 2 years ago

Hi @JendrikDerWeise Found this issue also related with your installed kotlin plugin on Android Studio, sometimes latest version of kotlin plugin not compatible with kmm and we have to wait kmm team updating it into the latest version.