编译错误 build.gradle脚本

239 阅读1分钟

More than one file was found with OS independent path ‘lib/armeabi-v7a/libRSSupport.so‘

解决方法:在APP module的build.gradle脚本,添加如下代码:

android {
    packagingOptions {
        pickFirst 'lib/armeabi-v7a/libRSSupport.so'
        
    }
    
}

其他类似的问题,还有more than one file ... META-INF/LICENSE.txt 解决方法,在packagingOptions中添加:

android {
    packagingOptions {
        .....
        exclude 'META-INF/LICENSE.txt'
        .....    
    }
}