More than one file was found with OS independent path ‘lib/armeabi/

Execution failed for task ':mobile:mergeDebugNativeLibs'.
> 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/libsmct_ecg.so'

解决办法一:

过滤掉重复的so文件:

android{
    packagingOptions {
//        exclude 'lib/arm64-v8a/libsmct_ecg.so'
//        exclude 'lib/armeabi/libsmct_ecg.so'
//        exclude 'lib/armeabi-v7a/libsmct_ecg.so'
        pickFirst  'lib/arm64-v8a/libsmct_ecg.so'
        pickFirst  'lib/armeabi/libsmct_ecg.so'
        pickFirst  'lib/armeabi-v7a/libsmct_ecg.so'
    }
 }

解决办法二:

项目代码中集成了cpp相关的源码,又集成了.so文件,导致重复了,删除相关的.so文件即可。

你可能感兴趣的:(gradle,.so,ndk,jni,so文件冲突)