Android(安卓)Studio 错误 Duplicate files copied in APK META-INF/LICENSE.txt
16lz
2021-12-04
Duplicate files copied in APK META-INF/LICENSE.txt
解决办法
android { packagingOptions { exclude 'META-INF/LICENSE.txt' }}
logcat: 日志 Error:Execution failed for task
Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/NOTICE.txt File1: …….jar File2: …….jar
有可能还会遇到其他的类似问题
下面是全部的解决办法 只需要找到对应的就可以把它exclude进去就解决了
android { packagingOptions { exclude 'META-INF/DEPENDENCIES.txt' exclude 'META-INF/LICENSE.txt' exclude 'META-INF/NOTICE.txt' exclude 'META-INF/NOTICE' exclude 'META-INF/LICENSE' exclude 'META-INF/DEPENDENCIES' exclude 'META-INF/notice.txt' exclude 'META-INF/license.txt' exclude 'META-INF/dependencies.txt' exclude 'META-INF/LGPL2.1' } }
更多相关文章
- MultiDex 遇到的大坑
- android studio更新到1.5后遇到的问题
- Android快速入门-----数据存储(三)Sqlite应用练习:增删查改案例练习
- android使用ant编译找不到apkbuilder.jar的错误的解决方法
- Android(安卓)studio 连接数据库小经历遇到的问题以及解决方法(ja
- Android(安卓)LinearLayout遇到的坑
- Android(安卓)沉浸式状态栏实现,以及遇到的问题
- Android(安卓)ListView移动至指定行
- 安装android sdk for linux遇到的几个问题和解决办法