場景
在集成第三方模塊時,需要引入一些so文件励背,運行項目報錯,
More than one file was found with OS independent path 'lib/armeabi-v7a/libnms.so'
解決方案
在啟動模塊(通常是app模塊)的build.gradle中添加如下代碼:
android {
...
// Fix: More than one file was found
packagingOptions {
pickFirst 'lib/armeabi-v7a/libnms.so'
}
}