More than one file was found wit
2020-06-12 本文已影响0人
世外大帝
More than one file was found with OS independent path 'lib/armeabi/libmyJNI.so'
More than one file was found with OS independent path 'lib/armeabi-v7a/libmyJNI.so'
More than one file was found with OS independent path 'lib/arm64-v8a/libmyJNI.so'
More than one file was found with OS independent path 'lib/x86/libmyJNI.so'
...
这个问题是由于有多项相同选项,所以选择首项即可,也可使用指定架构替换通配符。
在app下的build.gradle中加入以下代码:
android {
...
packagingOptions {
pickFirst 'lib/*/libmyJNI.so'
}
}
解释一下packagingOptions的几个选项:
-
doNotStrip "*/*/libyuv2.so"
不需要对应架构 -
exclude 'META-INF/rxjava.properties'
排除 -
pickFirst 'lib/*/libmyJNI.so'
选择首项