当前位置: 首页 > 工具软件 > One OS > 使用案例 >

More than one file was found with OS independent path

梅玉堂
2023-12-01

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的几个选项:

  1. doNotStrip "*/*/libyuv2.so" 不需要对应架构
  2. exclude 'META-INF/rxjava.properties' 排除
  3. pickFirst 'lib/*/libmyJNI.so' 选择首项
 类似资料:

相关阅读

相关文章

相关问答