Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kotlinx serializable annotation not found after build project #9

Open
rhonyabdullah opened this issue Jan 4, 2021 · 11 comments
Open
Labels
bug Something isn't working

Comments

@rhonyabdullah
Copy link

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
Copy link
Collaborator

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

  • version of Android Studio
  • version of Kotlin plugin for Android Studio
  • version of KMM plugin for Android Studio

@rhonyabdullah
Copy link
Author

rhonyabdullah commented Jan 15, 2021

Hi, here is:

  • Android Studio 4.1.1
Build #AI-201.8743.12.41.6953283, built on November 5, 2020
Runtime version: 1.8.0_242-release-1644-b3-6915495 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.16
GC: ParNew, ConcurrentMarkSweep
Memory: 7101M
Cores: 8
Registry: ide.new.welcome.screen.force=true, external.system.auto.import.disabled=true, debugger.watches.in.variables=false
Non-Bundled Plugins: com.github.shchurov.gradlestop, com.intellij.marketplace, org.jetbrains.kotlin, com.squareup.sqldelight, com.wakatime.intellij.plugin, dev.polek.adbwifi, com.jetbrains.kmm, com.developerphil.adbidea, com.wahdan.com.wahdan.spockAdb
  • Kotlin plugin: 1.4.21-release-Studio4.1-1
  • KMM: 0.2.0-release-65-Studio4.1

@bagolysz
Copy link

bagolysz commented Feb 9, 2021

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

@rhonyabdullah
Copy link
Author

rhonyabdullah commented Feb 17, 2021

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

@toth-istvan-zoltan
Copy link

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
Copy link

@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
Copy link
Author

@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
Copy link
Collaborator

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)

@KaterinaPetrova KaterinaPetrova added the bug Something isn't working label Jul 19, 2021
@MarkRS-UK
Copy link

MarkRS-UK commented Sep 22, 2021

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 Kotlin/kotlinx.serialization#73 apply, I think. I was already using the Kotlin DSL, I had not applied "organise imports" (I'm on AS), my versions are

  • Kotlin 1.5.30 (can KMM version be different? I haven't specified it in build.kts)
  • Serialize 1.2.2
  • AS Arctic Fox

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
Copy link

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants