BUG Error:Execution failed for task ':app:dexDebug'.
Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_66\bin\java.exe'' finished with non-zero exit value 2
想弄一下google地图,然后,直接通过android studio来生成了这个project。但是,运行的时候出现了以上错误。
找了一下资料。
http://stackoverflow.com/questions/28917696/errorexecution-failed-for-task-appdexdebug-com-android-ide-common-process
原因是以下:
It seems you have a jar file or a lib appearing multiple times.
So, remove the .jar file from the lib folder then:
Build > Rebuild
翻译过来大概是:
就是说jar文件或者lib文件出现了多次。
所以在把lib中对应的.jar文件移除就可以了。然后再rebuild
BUT!!人生最厉害就是这个BUT了。
作为初学者,其实不懂什么叫.jar,更不知道它在哪。
还好我有另外一个解决办法。
I had the same problem error that is shown, i solve it by adding
defaultConfig {
// Enabling multidex support.
multiDexEnabled true
}
I had this problem cause i exceeded the 65K methods dex limit imposed by Android i used so many libraries
在Gradle Scripts中
build.gradle(Module:app)文件里,
找到defaultConfig,在里面添加
multiDexEnabled true 也就是下面这样。
defaultConfig {
multiDexEnabled true } 然后再找了一下multiDexEnabled的作用是什么。
然后就找到了,
造成以上问题的原因。
应用中的Dex 文件方法数超过了最大值65536的上限,简单来说,应用爆棚了. 要想详细了解一下,可以看以下博客链接。作为初学者的我就不看了。主要是因为懒
时之沙: http://blog.csdn.net/t12x3456 (来自时之沙的csdn博客)
http://blog.csdn.net/t12x3456/article/details/40837287
BUG Error:Execution failed for task ':app:dexDebug'.的更多相关文章
- 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.ProcessE ...
- Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.process.ProcessException总结
最新项目中遇到了 Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.process.Proces ...
- Error:Execution failed for task ':app:dexDebug'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process ...
- Error:Execution failed for task ':app:clean'.
运行时出现 Error:Execution failed for task ':app:clean'. 错误,Builld->Clean Project即可.
- Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
使用android studio 时,编译成功但用build apk时却报错 环境: android studio 1.5, jdk1.7 错误:Error:Execution failed for ...
- Android Studio 运行出现 Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
转载请标明出处: http://www.cnblogs.com/why168888/p/5978381.html 本文出自:[Edwin博客园] 我引用compile 'com.squareup.re ...
- Error:Execution failed for task ':app:transformClassesWithDexForDebug'解决记录
转载请标明出处: http://blog.csdn.net/lxk_1993/article/details/50511172 本文出自:[lxk_1993的博客]: 3个错误non-zero e ...
- Error:Execution failed for task ':app:mergeDebugResources'. > Some file crunching failed, see logs f
今天调试安卓程序遇到的问题Error:Execution failed for task ':app:mergeDebugResources'. > Some file crunching fa ...
- 异常问题解决Error:Execution failed for task ':app:processDebugManifest'
Error:Execution failed for task ':app:processDebugManifest' www.MyException.Cn 网友分享于:2015-12-28 浏览 ...
随机推荐
- spoolsv.exe 报错,无法打印
在使用打印机过程中突然出现spoolsv.exe应用程序错误,内存不能written•••,检查打印驱动,打印机设置选项无法打开.怀疑是病毒所致,升级杀毒软件后安全模式下杀毒后没有发现病毒,重启后还是 ...
- Makefile第三讲:终端传值给Makefile、Makefile传值给C++代码
摘要 终端传值给Makefile,咋传?只需在终端输入以下命令,那么就可以在Makefile文件中放心大担的使用$(abcde)这个变量了,它的值为BBB Makefile fun.h #includ ...
- MD5Helper辅助类
DES加密和解密 public class MD5Helper { ///DES加密 ///sKey public string MD5Encrypt(string pToEncrypt, strin ...
- IIS短文件漏洞修复
近期网站系统被扫描出漏洞:IIS短文件/文件夹漏洞 漏洞级别:中危漏洞 漏洞地址:全网站 漏洞描述:IIS短文件名泄露漏洞,IIS上实现上存在文件枚举漏洞,攻击者可利用此漏洞枚举获取服务器根目录中的文 ...
- CLR Profiler 性能分析工具 (转)
原文地址:http://www.cnblogs.com/kevinlzf/archive/2010/11/12/1876066.html 下载地址:http://www.microsoft.com/e ...
- poj 1654 Area(多边形面积)
Area Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 17456 Accepted: 4847 Description ...
- DAL与数据库类型的对应关系
MSSQL Server类型 DbType类型 C#类型 MySql类型 DbType类型 C#类型 bit Boolean bool bit(1) Boolean bool tinyint ...
- 一段SQL代码的压缩:从974行到96行,十倍压缩
涉及到数据库拆分,需要将相关表的JOIN SQL剥离. 剥离过程中,发现了这么个SQL XML.整个SQL 974 行,分为6个函数.读起来费劲无比. <?xml version="1 ...
- 南京Uber优步司机奖励政策(2月1日~2月7日)
滴快车单单2.5倍,注册地址:http://www.udache.com/ 如何注册Uber司机(全国版最新最详细注册流程)/月入2万/不用抢单:http://www.cnblogs.com/mfry ...
- 经典SQL语句大全之基本函数
SQL Server基本函数 1.字符串函数 长度与分析用 1,datalength(Char_expr) 返回字符串包含字符数,但不包含后面的空格2,substring(expression,sta ...