编译JNI项目时,遇到了这样的错误:
More than one file was found with OS independent path 'lib/x86_64/libopencv_java4.so'.
If you are using jniLibs and CMake IMPORTED targets, see https://developer.android.com/studio/preview/features#automatic_packaging_of_prebuilt_dependencies_used_by_cmake
解决方案:
sourceSets {
main { jniLibs.srcDirs = ['libs']}
}