More than one file was found with OS independent path 'lib/armeabi-v7a/libcardioDecider.so
lantian699 opened this issue · 10 comments
General information
- SDK/Library version: 5.5.1
- Android Version and Device: Samsung S5 with Android 6.0
Issue description
I had this error when running app in Android Studio, complile is pass. I can't understand why this error appears. And I found nothing in Internet for the similar error when using card.io. perhaps this is particular for my project due to different dependencies I used.
no one answer my question, I finally found that it is due to incompatibilities with Reach5 library.
Would you mind sharing the incompatibilities you ran into for anyone else that may run into this issue?
I don't have further information for this issue, I just test every library listed in my gradle file to verify which one can cause the conflict with card.io. finally that is reachFive (https://reachfive.co/en/) which we use to connect our app with social account. I'm working on it and i will go back here to post my solution if I could try to figure out.
Since two weeks I'm stuck in it, finally I figure out the source of problem.
It is because that ReachFive Library (a library used in my project)has include an old version of CARD.IO for his PAYPAL service. So I found the exactly same .so file in his AAR. and my solution is brutal, I use winRAR to open directly its AAR library and delete JNI file completely for 2 reason below:
- The application needs just one set of .so file (needed for Card.IO) in JNI path, if two libraries contain the same .so files, it will create conflict obviously.
- We dont use the PAYPAL service provided in ReachFive Library. And even though we need it, I think its old Card.IO can also use this new version .so file, it depends on the compatibility I dont verify this point.
I have another solution which can simply eliminate this kind of error in order to build successfully the project. add this in gradle file:
packagingOptions { exclude "lib/armeabi-v7a/libcardioDecider.so" exclude "lib/armeabi-v7a/libcardioRecognizer.so" exclude "lib/armeabi-v7a/libopencv_imgproc.so" exclude "lib/armeabi-v7a/libcardioRecognizer_tegra2.so" exclude "lib/armeabi-v7a/libopencv_core.so" exclude "lib/armeabi/libcardioDecider.so" exclude "lib/mips/libcardioDecider.so" exclude "lib/x86/libcardioDecider.so" }
But this solution is not perfect, it will exclude all .so file mentioned above. then neither ReachFive nor Card.IO can access into his so file, Card.IO will not start camera. I wonder that why in this method "packagingOptions" I cannot define a scope that my rules will applied for?
Alright, at least it works !
This one also will help.. https://stackoverflow.com/a/44962630/1237175
check with your lib folder might be having same aar/jar file in double in with different name.
Error:Execution failed for task ':app:transformNativeLibsWithMergeJniLibsForDebug'.
More than one file was found with OS independent path 'lib/armeabi-v7a/libopencv_java3.so'
i want delete this path becuse conflict with file orginal
im use code in gredl
packagingOptions{
exclude 'lib/armeabi-v7a/libopencv_java3.so'
}
but not success ...
plz help me
I have a similar problem, read your issue, I have solved my problem. thank you
I have got the same issue file lib/x86_64/libsqlcipher.so found more thane once and found out the solution.
This happens due to the same file coming multiple times in dependencies or modules.
Fixed by adding following code in app build.gradle file inside android block
android {
---
packagingOptions {
pickFirst 'lib/x86_64/libsqlcipher.so'
pickFirst 'lib/armeabi/libsqlcipher.so'
pickFirst 'lib/x86/libsqlcipher.so'
pickFirst 'lib/armeabi-v7a/libsqlcipher.so'
pickFirst 'lib/arm64-v8a/libsqlcipher.so'
}
---
}