More than one file was found with OS independent path ‘lib/xxx/xxxx.so‘

问题:
APP在使用过程中,遇到高版本的android系统,地图开始出现不兼容问题,升级后arcgis版本后,运行编译时出现异常


More than one file was found with OS independent path 'lib/armeabi-v7a/libc++_shared.so'. If you are using jniLibs and CMake IMPORTED targets ....

分析:
依赖so重复

解决:
1,更改module app build.gradle文件,将报错的so文件添加下,报几个加几个


    packagingOptions {
        pickFirst 'lib/xxxx/xxxx.so'
    }

    sourceSets {
        main {
            jniLibs.srcDirs = ['libs']
        }
    }

2,添加后sync now一下,若没有出现提示,通过build-clean project,rebuild project之后就会出现提示,
必须sync,应该就没问题了

你可能感兴趣的:(java)