com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK assets/com.xx.xx
完整的Error 信息(关键部分)
Error:Execution failed for task ':fanwe_o2o_47_mgxz_dingzhi:transformResourcesWithMergeJavaResForDebug'.
com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK assets/com.tencent.plus.logo.png
File1: E:\TGit\EclispeAS\mgxz_user\fanwe_o2o_47_mgxz_dingzhi\libs\open_sdk.jar
File2: E:\TGit\EclispeAS\mgxz_user\fanwe_o2o_47_mgxz_dingzhi\build\intermediates\exploded-aar\mgxz_user\library_umeng_share_project\unspecified\jars\classes.jar
解决方案:
在Gradle中配置:
packagingOptions {
exclude 'assets/com.tencent.plus.logo.png'
}
原因:
在AS编译打包apk是,资源文件重复了,有两个名称一样的"com.xx.xx",
配置的意思是保留其中一个,这样就能打包成功.
注意:
上面的解决方案是在确定你没有重复导入jar包,so文件.注意不同module的jar与so文件,他们打包时会合并,所以同样的jar在整个项目中只能含有一份!
com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK assets/com.xx.xx的更多相关文章
- com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/NOTICE
在将vivo eclipse sdk 迁移 android studio 时候报错 Error:Execution failed for task ':vivosdk:transformResour ...
- 错误:com.android.builder.packaging.DuplicateFileException: Duplicate files copied
File2: C:\Users\guoxw\.gradle\caches\modules-2\files-2.1\org.jsoup\jsoup\1.10.3\b842f960942503cf1abb ...
- Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.Exec
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.> com.android.build.api.tr ...
- react native报错处理com.android.build.api.transform.TransformException: com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: Failed to process
背景:最近准备在使用react-native开发的app中接入友盟,来进行用户行为统计,分享,授权登录等操作. 在使用的过程中,遇到了一些错误信息,在此记录一下. 在修改android目录下的buil ...
- com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files
http://stackoverflow.com/questions/33951853/com-android-build-api-transform-transformexception-com-a ...
- com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/annotation/ColorRes.class
保存信息如上: 我在添加一个支持库的时候遇的问题,这个库com.yanzhenjie:album:1.0.5 这是由于v4包重复导致的,在网上我也找过多种解决方案 用了这种,方式 configur ...
- Android Duplicate files copied in APK
今天调试 Android 应用遇到这么个问题: Duplicate files copied in APK META-INF/DEPENDENCIES File 1: httpmime-4.3.2.j ...
- Android Studio 错误 Duplicate files copied in APK META-INF/LICENSE.txt解决方案
My logcat: log Execution failed for task ':Prog:packageDebug'. Duplicate files copied in APK META-IN ...
- Android Studio 错误 Duplicate files copied in APK META-INF/LICENSE.txt
1 .Duplicate files copied in APK META-INF/LICENSE.txt android { packagingOptions { exclude 'META-I ...
随机推荐
- 嵌入式Linux学习入门:控制LED灯
记录自己linux学习过程,让自己能够一直坚持下去 1.原理图分析: nLED_1, nLED_2, nLED_4, 给低电平则对应LED灯亮,高电平则对应LED灯灭, S3C2440芯片GPF4-G ...
- Beta工作比例(Transcend)
Beta工作比例 成员 工作 黄志明 10% 洪志兴 10% 李佳恺 17 % 巫振格 17 % 肖承志 10 % 李严 16 % 牛妍辉 stripes 20%
- Mac锁屏
http://www.dbform.com/html/2006/192.html 应用程序-实用工具-钥匙锁-菜单栏中的钥匙串访问-偏好设置-选中“在菜单栏中显示钥匙串”
- 《程序员的自我修养》读书笔记 - dllimport
Math.c { __declspec (dllexport) double Add (xx, xx) {...}} MathApp.c { __declspec(dllimport) doub ...
- EditText限制小数点前后位数
在EditText输入数字的时候,通常我们需要限制小数点前后位数.比如金额输入一般我们需要限制小数点后面最多2位.我们可以通过 TextWatcher 实现. public class MyWatch ...
- asp.net两种方式的短信接口使用(提供接口的都是收费的)
一种是http请求的方式,另一种就是提供WebService接口供调用的. //服务商 sms.webchinese.cn //sms_url="http://sms.webchinese. ...
- Files 的值“<<<<<<< .mine”无效。路径中具有非法字符
解决冲突,告诉SVN这个问题已解决(Resolved). 一般更简单些:在你的工程OBJ/DEBUG目录下,找到 工程名.csproj.FileListAbsolute.txt的文件打开并删除含有'& ...
- 开启PHP的伪静态
1.检测Apache是否支持mod_rewrite 通过php提供的phpinfo()函数查看环境配置,通过Ctrl+F查找到“Loaded Modules”,其中列出了所有 apache2handl ...
- JSPatch 中 defineClass 中覆盖方法的使用
今天研究了一下JSPatch,发现好神奇好奇妙,感觉这几天我都会乐此不彼的去研究这个高大上的东西. 出处来着:https://github.com/bang590/JSPatch 简单介绍一下这个 d ...
- grunt-connect-proxy解决开发时跨域问题
最近的项目中前后端是完全分离开发的,前端用grunt管理项目.这样就会导致一个问题:开发时前端调用后台的接口时因为不在一个服务器,所以会出现跨域问题.但是也不能用JSONP或CROS方式实现真正的跨域 ...