Possibility to have realm-kotlin and realm-jvm in same project
See original GitHub issueWhen some library (like Lokalise) is using realm-jvm under the hood it becomes impossible to use due to conflict between library and kmm modules which use realm-kotlin. Sample error log:
Duplicate class io.realm.BaseRealm found in modules jetified-library-debug-runtime (io.realm.kotlin:library-android-debug:0.1.0) and jetified-realm-android-library-10.0.0-runtime (io.realm:realm-android-library:10.0.0)
Duplicate class io.realm.BuildConfig found in modules jetified-library-debug-runtime (io.realm.kotlin:library-android-debug:0.1.0) and jetified-realm-android-library-10.0.0-runtime (io.realm:realm-android-library:10.0.0)
Duplicate class io.realm.Realm found in modules jetified-library-debug-runtime (io.realm.kotlin:library-android-debug:0.1.0) and jetified-realm-android-library-10.0.0-runtime (io.realm:realm-android-library:10.0.0)
Duplicate class io.realm.RealmConfiguration found in modules jetified-library-debug-runtime (io.realm.kotlin:library-android-debug:0.1.0) and jetified-realm-android-library-10.0.0-runtime (io.realm:realm-android-library:10.0.0)
Duplicate class io.realm.RealmConfiguration$Builder found in modules jetified-library-debug-runtime (io.realm.kotlin:library-android-debug:0.1.0) and jetified-realm-android-library-10.0.0-runtime (io.realm:realm-android-library:10.0.0)
Duplicate class io.realm.RealmObject found in modules jetified-library-debug-runtime (io.realm.kotlin:library-android-debug:0.1.0) and jetified-realm-android-library-10.0.0-runtime (io.realm:realm-android-library:10.0.0)
Duplicate class io.realm.RealmResults found in modules jetified-library-debug-runtime (io.realm.kotlin:library-android-debug:0.1.0) and jetified-realm-android-library-10.0.0-runtime (io.realm:realm-android-library:10.0.0)
Duplicate class io.realm.log.LogLevel found in modules jetified-library-debug-runtime (io.realm.kotlin:library-android-debug:0.1.0) and jetified-realm-android-library-10.0.0-runtime (io.realm:realm-android-library:10.0.0)
Duplicate class io.realm.log.RealmLogger found in modules jetified-library-debug-runtime (io.realm.kotlin:library-android-debug:0.1.0) and jetified-realm-android-library-10.0.0-runtime (io.realm:realm-android-library:10.0.0)
Possible solution: have different package name for realm-kotlin like io.realm.kotlin
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Realm Kotlin Multiplatform SDK - The JetBrains Blog
At a high level, the Realm compiler plugin's main goal is to make defining Realm models as simple as constructing a regular Kotlin...
Read more >Realm: Create reactive mobile apps in a fraction of the time
When Kotlin is used in a project, Realm automatically detects this and adds a number of extension methods that makes working with Kotlin...
Read more >Realm Kotlin SDK - YouTube
Getting started with # Realm # Kotlin #Multiplatform SDK. ... Android as well as Kotlin Multiplatform projects (iOS, macOS, JVM and Android).
Read more >Realm Kotlin Resolve$SymbolNotFoundError using inner ...
This is the weirdest bug I have ever had. If the enum has an Int attribute instead of a String one, it works....
Read more >Kotlin: A New Hope in a Java 6 Wasteland - Realm Academy
Even then, if we do get Java 8 support in the next couple of years, it's going to be a while longer before...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oh, makes sense now. I was expecting usage of the same native parts and KMM being only a middleware for single codebase.
The problem is that the native parts are not exactly the same, so we cannot just reuse the so-file in both SDKs. And as said, aligning them or finding a way where the two different versions can coexist is not on our current roadmap.
The obvious thing to do would be to migrate old libraries to Realm Kotlin when the required feature set is supported. Then it would just be a matter of aligning the versions in the dependencies.