I know there is a few similar questions on SO, but it does not work for me...
I created Android lib, that use ArCore. It was a question on SO how to don't include .so file if I use created ndk lib? There is also one answer that sounds right
https://stackoverflow.com/a/58963852/5709159
But after I putted libarcore.so
files under my jniLib
I got such error
More than one file was found with OS independent path 'lib/armeabi-v7a/libarcore_sdk_jni.so'
So, I tried to fix it this ways
https://stackoverflow.com/a/44962630/5709159
sourceSets.main {
jniLibs.srcDir 'src/main/jniLibs'
jni.srcDirs = [] //disable automatic ndk-build call
}
https://stackoverflow.com/a/56453718/5709159
packagingOptions {
pickFirst 'src/main/jniLibs/arm64-v8a/libarcore_sdk_jni.so'
pickFirst 'src/main/jniLibs/armeabi-v7a/libarcore_sdk_jni.so'
pickFirst 'src/main/jniLibs/x86/libarcore_sdk_jni.so'
pickFirst 'src/main/jniLibs/x86_64/libarcore_sdk_jni.so'
}
then this
packagingOptions {
pickFirst 'lib/arm64-v8a/libarcore_sdk_jni.so'
pickFirst 'lib/armeabi-v7a/libarcore_sdk_jni.so'
pickFirst 'lib/x86/libarcore_sdk_jni.so'
pickFirst 'lib/x86_64/libarcore_sdk_jni.so'
}
and also this packagingOptions { exclude 'lib/arm64-v8a/libarcore_sdk_jni.so' exclude 'lib/armeabi-v7a/libarcore_sdk_jni.so' exclude 'lib/x86/libarcore_sdk_jni.so' exclude 'lib/x86_64/libarcore_sdk_jni.so' }
Nothing helped.
As far as I understand issue is - I have one copy of arcore.so
files under my jniLibs
dir and one copy created after Build
here
So, how to fix it?