korlibs / korge

KorGE Game Engine. Multiplatform Kotlin Game Engine
https://korge.org/
Other
2.49k stars 123 forks source link

Cannot access 'com.soywiz.klock.internal.Serializable' which is a supertype of 'com.soywiz.klock.DateTimeTz'. Check your module classpath for missing or conflicting dependencies #678

Open ln-12 opened 2 years ago

ln-12 commented 2 years ago

I added your library in my KMM project, but get the following error message:

Cannot access 'com.soywiz.klock.internal.Serializable' which is a supertype of 'com.soywiz.klock.DateTimeTz'. 
Check your module classpath for missing or conflicting dependencies

I setup a minimal example here: https://github.com/ln-12/KlockTest The error occurs here when I navigate to this file in Android Studio: https://github.com/ln-12/KlockTest/blob/feb419e73ae4ad995d062973d527fa428b9f2dd3/androidApp/src/main/java/com/example/klocktest/android/MainActivity.kt#L18

Changing implementation to api did not solve the problem. Do you have any idea how to solve this?

soywiz commented 2 years ago

In android and the JVM it is declared as a typealias of java.io.Serializable: https://github.com/korlibs/klock/blob/80e6eebb152c736249bc5a9673f5f006b1ff349e/klock/src/androidMain/kotlin/com/soywiz/klock/internal/KlockInternal.kt#L17

ln-12 commented 2 years ago

Thanks for your reply. Yeah, I noticed that already. So do you think that's something I can fix in my project, you can fix in the library or JetBrains has to fix in the IDE?