question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DuplicateRelativeFileException: More than one file was found with OS independent path 'lib/x86/libobjectbox.so'

See original GitHub issue
buildscript {
     ext.objectboxVersion = '1.2.1'
}

apply plugin: 'io.objectbox'

implementation "io.objectbox:objectbox-android:$objectboxVersion"
implementation "io.objectbox:objectbox-kotlin:$objectboxVersion"
debugImplementation   "io.objectbox:objectbox-android-objectbrowser:$objectboxVersion"
kapt "io.objectbox:objectbox-processor:$objectboxVersion"

run ‘app’

Caused by: com.android.builder.merge.DuplicateRelativeFileException: More than one file was found with OS independent path ‘lib/x86/libobjectbox.so’

Android Studio 3.0 classpath ‘com.android.tools.build:gradle:3.0.0’ kotlin_version = ‘1.1.60’

How to solve it?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
weiyfcommented, Nov 16, 2017

I found a temporary way

 packagingOptions {
        pickFirst 'lib/x86/libobjectbox.so'
        pickFirst 'lib/armeabi-v7a/libobjectbox.so'
        pickFirst 'lib/arm64-v8a/libobjectbox.so'
}

but … another error came out:

Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lio/objectbox/android/AndroidScheduler;

0reactions
greenrobot-teamcommented, Jan 10, 2022

@aaaamirabbas This issue is rather old. If you have a similar problem, please create a new issue with additional details so we can have a look.

Read more comments on GitHub >

github_iconTop Results From Across the Web

More than one file was found with OS independent path 'lib ...
When I am trying to build libusb native library then I get below error message, *.so files generated. Error:Execution failed for task ':app: ......
Read more >
[Android] More than one file was found with OS independent ...
More than one file was found with OS independent path 'META-INF/nanohttpd/mimetypes.properties' I googled around a bit and I tried both packagingOptions {
Read more >
than one file was found with OS independent path 'lib/arm64 ...
... "More than one file was found with OS independent path 'lib/arm64-v8a/libc++_shared.so' ". I tried everything I found on the internet to ...
Read more >
than one file was found with OS independent path 'META-INF ...
More than one file was found with OS independent path 'META-INF/DEPENDENCIES'packagingOptions { exclude 'META-INF/DEPENDENCIES' exclude ...
Read more >
"More than one file was found with OS independent path ...
There seems to be a very small number of users with AGP 4.0+ and Kotlin less than 1.3.40, so I'd rather have a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found