我尝试在Android Studio上运行一个安卓Eclipse项目。
我查阅了许多互联网上的解决方案。
但仍然出现了一些问题。
Error:duplicate files during packaging of APK /home/sam/pst-adnew/panstage/build/outputs/apk/panstage-debug-unaligned.apk
Path in archive: lib/armeabi-v7a/libmp3lame.so
Origin 1: /home/sam/pst-adnew/panstage/build/intermediates/exploded-aar/pst-adnew/panstage_local_library/unspecified/jni/armeabi-v7a/libmp3lame.so
Origin 2: /home/sam/pst-adnew/panstage/build/intermediates/ndk/debug/lib/armeabi-v7a/libmp3lame.so
You can ignore those files in your build.gradle:
android {
packagingOptions {
exclude 'lib/armeabi-v7a/libmp3lame.so'
}
}
Error:Execution failed for task ':panstage:packageDebug'.
> Duplicate files copied in APK lib/armeabi-v7a/libmp3lame.so
File 1: /home/sam/pst-adnew/panstage/build/intermediates/exploded-aar/pst-adnew/panstage_local_library/unspecified/jni/armeabi-v7a/libmp3lame.so
File 2: /home/sam/pst-adnew/panstage/build/intermediates/exploded-aar/pst-adnew/panstage_local_library/unspecified/jni/armeabi-v7a/libmp3lame.so
我正在使用NDK Android Studio进行工作。
请帮助我。
我也尝试过解决方案。
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}
.so
文件,我解决了这个问题。 - Egos Zhang