- More than one file was found wit
- More than one file was found wit
- More than one file was found wit
- More than one file was found wit
- More than one file was found wit
- More than one file was found wit
- More than one file was found wit
- More than one file was found wit
- More than one file was found wit
- More than one file was found wit
问题:
前因:
Android Studio从3.4.1 升级到4.0.1,Gradle Plugin从3.4.1 升级到4.0.1,Gradle从4.1升级到6.1.1
后果:
原来的项目模块不会打包通过CMake Import的动态库到aar包中。升级后,项目每次打包,so库都会被打包进aar中。
错误现象:
More than one file was found with OS independent path ‘lib/armeabi-v7a/libdemo-lib.so’. If you are using jniLibs and CMake IMPORTED targets, see https://developer.android.com/studio/preview/features#automatic_packaging_of_prebuilt_dependencies_used_by_cmake
解决办法:
思路:
Gradle Plugin换成4.0以下,Gradle换成6.0以下
本人实际操作:
Gradle Plugin版本
Gradle版本设置
参考资料:
官方文档:
https://developer.android.google.cn/studio/releases/gradle-plugin#updating-gradle
https://developer.android.google.cn/studio/releases/gradle-plugin#cmake-imported-targets
网友评论