More Than One File Was Found With Os Independent Path 'lib/armeabi-v7a/libarcore_sdk_jni.so'
Solution 1:
You've likely added the shared .so
files and build from source (or reference them otherwise).
One cannot do both at the same time, so you'd either need to build from source and delete those .so
files - or delete the arcore-android-sdk
module and keep the .so
files. Java dependencies
might also pull in native assembly, while that part of the build.gradle
is missing (just browse AR core in the "External Libraries" to see what it contains, in case it exists there). Using pre-built libraries generally builds quicker and saves time - which is suggested, unless needing to edit cpp
sources.
Usually one can provide the dependencies alike in this build.gradle
:
dependencies {
implementation "com.google.ar:core:1.13.0"
natives "com.google.ar:core:1.13.0"
}
// Extracts the shared libraries from aars in the natives configuration.// This is done so that NDK builds can access these libraries.task extractNativeLibraries() {
// Always extract, this ensures the native libs are updated if the version changes.
outputs.upToDateWhen { false }
doFirst {
configurations.natives.files.each { f ->
copy {
fromzipTree(f)
into arcore_libpath
include "jni/**/*"
}
}
}
}
tasks.whenTaskAdded {
task-> if (task.name.contains("external") && !task.name.contains("Clean")) {
task.dependsOn(extractNativeLibraries)
}
}
Such Gradle task could also be the reason for the duplicates, when it's not configured properly. packagingOptions
are in every case the wrong approach, when the linker already doesn't know which one to link.
Post a Comment for "More Than One File Was Found With Os Independent Path 'lib/armeabi-v7a/libarcore_sdk_jni.so'"