Hello, I'm trying to use Realm in a KMM project. I...
# realm
w
Hello, I'm trying to use Realm in a KMM project. I'm currently having this issue:
Copy code
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeNativeLibsTask$MergeNativeLibsTaskWorkAction
> 2 files found with path 'lib/arm64-v8a/libc++_shared.so' from inputs:
- /Users/user/.gradle/caches/transforms-3/1c287d2e67b3c5b974a3d788019fbb77/transformed/cinterop-debug/jni/arm64-v8a/libc++_shared.so
- /Users/user/.gradle/caches/transforms-3/c9cf1220b9ceac85f3ed5bdc8040d46c/transformed/fbjni-0.3.0/jni/arm64-v8a/libc++_shared.so
From what I could see, the
cinterop-debug
comes from Realm, while the
fbjni-0.3.0
comes from Facebook Flipper. Any ideas or suggestions? (I can't remove Flipper as we have some custom plugins to help devs)
c
I haven’t tried it out but maybe you can use pickFirst like
Copy code
android {
   packagingOptions {
       pickFirst("jni/arm64-v8a/libc++_shared.so")
   }
}
I guess it still not guaranteed to work even if only packaging one so-file, as the different dependencies have to be build against compatible releases: https://developer.android.com/ndk/guides/cpp-support#one_stl_per_app
@wbertan We have released
0.10.1
that uses a static runtime instead of the shared one. Maybe try that out and see if it eliminates the issue … and provide feedback if you have other issues with symbols arising from that.
👍 1