Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'的解决办法
此文停止更新,原文内容请移步: http://www.bianxiaofeng.com/view/16
前言
在Android的开源环境下,也就多出来很多优秀的第三方的项目,但是因为很多第三方的项目和目前你正在开发的APP使用的Lib有些是重复的,这样会导致transformClassesWithDexForDebug
本文介绍年两种方法来处理这个问题。
解决方案
添加“multiDexEnabled true”到 defaultConfig
在app的build.gradle文件中的 defaultConfig添加:
multiDexEnabled true
如图所示:
这样的设置只能解决一部分的问题,而更加难受的情况是在项目中引入了很多的第三方库,这个时候鬼知道哪个库出了问题,一个一个试可能能够找出来,但是找出来黄花菜都凉了。
这个时候请移步解决方法二
根据Message信息找到重复的包
在Setting->Build,Execution,Deployment->Compiler中的Command-line Opptions中输入**–stacktrace**启用堆栈跟踪
接着运行APP,就能够在Message上面输出:
这样我根据上面消息找到了butterknife重复包。
Error:java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
Error:Execution failed for task ‘:app:transformDexArchiveWithExternalLibsDexMergerForDebug’.
com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'的解决办法相关推荐
- Androi Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'
1.删去.gradle →cleanProject 失败 2.在android/app/build.gradle文件的defaultConfig中添加 multiDexEnabled true 失败 ...
- 完美解决Error:Execution failed for task ':APP:transformClassesWithDexForDebug'...问题
今天下载一个demo运行出现问题,错误如下图 我的问题是JDK 1.8 版本问题问题,我吧1.8改成1.7运行成功 这个实在app下面的build.gradle 相信大伙在Android开发过程中都避 ...
- 安卓中运行报错Error:Execution failed for task ':app:transformClassesWithDexForDebug'解决
在androidstuio中运行我的未完项目,报错: Error:Execution failed for task ':app:transformClassesWithDexForDebug'. & ...
- Error:Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException
异常Log: Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.process.Process ...
- 解决方案:Error:Execution failed for task ‘:app:compileDebugAidl‘. > aidl is missing
解决方案:Error:Execution failed for task ':app:compileDebugAidl'. > aidl is missing 参考文章: (1)解决方案:Err ...
- 安卓开发遇到Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
问题如下: Error:Execution failed for task ':app:transformClassesWithDexForDebug'. com.android.build.api. ...
- Error:Execution failed for task ':app:clean'.
运行时出现 Error:Execution failed for task ':app:clean'. 错误,Builld->Clean Project即可. 转载于:https://www.c ...
- Error:Execution failed for task ':app:transformClassesWithDexForDebug'解决记录
3个错误non-zero exit value 1: non-zero exit value 2: non-zero exit value 3(一下方法亲测好用) Error:Execution fa ...
- android dex2oatd e,解決android項目Error:Execution failed for task ':app:dexDebug'.ebug'錯誤
先上錯誤信息:Error:Execution failed for task ':app:dexDebug'.> com.android.ide.common.process.ProcessEx ...
- 【Android】Error:Execution failed for task ':app:lint'
详细信息如下: Error:Execution failed for task ':app:lint'. > Lint found errors in the project; aborting ...
最新文章
- Lilt:一个为翻译专家开发的人工智能翻译平台
- 信息化监理公司的所有问题归到底是人的使用和管理
- opencv 眼睛识别 linux,用opencv测试人脸识别眨眼练习及问题
- 外包以小时计算金额的费用_基金申购赎回费用计算实例
- 【Elasticsearch】Elasticsearch 的异步搜索原理解析 _async_search
- 【同行说技术】Java程序员小白变大神必读资料汇总(三)
- Python 机器学习 随机森林 天气最高温度预测任务(三)
- 模式实例之——单件模式实例
- Python3 从零单排17_类的继承
- Android平台下的ToDoList
- 201204NEWS
- Mysql高级-day02
- 配置vscode解决code runner乱码
- 固定资产取消月末结账时报错,提示:BOF或EOF中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录...
- 基于MATLAB的混沌密码与数字图像加密应用、信息隐藏
- 若依Vue分离版本 RuoYi-Vue管理系统部署
- return true
- 爬取国内创业公司、投资机构、独角兽公司信息
- 【风控模型方法论】利用系数符号、VIF和IV快速挑选模型变量
- 智能鉴黄--视频鉴黄
热门文章
- 微信邮箱号怎么申请注册?如何注册微信邮箱账号?微信邮箱提醒设置注册教程~
- JAVA集成腾讯云即时通讯IM服务端
- Python|判断素数
- [MUI框架]-滑动侧边栏-div同页结构
- Nacos 一致性协议:Distro协议
- java 锯齿_Java2D图形抗锯齿
- 计算机毕业设计node+vue基于微信小程序的乐团团购系统的设计与实现
- 前端工程师薪资差距可达7.3倍!4月程序员薪资统计出炉,速看!
- 【C语言】求方程式 ax^2+bx+c=0 的根, 分别考虑: 1、有两个不等的实根 2、有两个相等的实根
- Java对接微信开放平台详解