错误信息:
More than one file was found with OS independent path ‘lib/armeabi-v7a/libyuv.so’.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> More than one file was found with OS independent path 'lib/armeabi-v7a/libyuv.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
修复:
在app目录下的build.gradle文件中加入:
android{
packagingOptions {
// 匹配到多个相同文件,只提取第一个
pickFirst "lib/armeabi-v7a/libyuv.so"
pickFirst "lib/arm64-v8a/libyuv.so"
}
}