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 浏览 ...
随机推荐
- oracle core04_undo
undo信息 oracle中undo的信息主要完成下面的功能: 1,构建块一致性读 2,回滚事务 UBA:undo block address 1,块中的事务槽ITL中的UBA表示这个ITL所在的bl ...
- jquery ui dialog去除第一个文本框焦点问题
最近做项目时,使用了jqueryUI dialog功能,当打开弹出框时,如果弹出框内容里面存在input,那么弹出框会自动获得第一个文本框焦点. 有时候,弹出框会有日期控件,一般日期控件采用focus ...
- 构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(1)-前言与目录(持续更新中...)
转自:http://www.cnblogs.com/ymnets/p/3424309.html 曾几何时我想写一个系列的文章,但是由于工作很忙,一直没有时间更新博客.博客园园龄都1年了,却一直都是空空 ...
- AIX项目总结_oracle_sqlloader_01
近来一直在忙AIX的移行项目,但也因自己小小偷懒,所以到现在才开始记录.接下来,言归正传. 这个项目中,学习中了shell相关知识,从基本的语法命令(定义变量.特殊变量使用.循环控制.方法调用等)到l ...
- Lambda表达式与匿名方法
在C#2中,由于有了方法组,匿名方法,类型的协变和抗变,使得运用delegate变得很容易,在注册事件时代码变得简单易读,但是在C# 2中,代码仍然有点臃肿,大块的匿名方法会降低代码的可读性,一般我们 ...
- Tsinsen A1504. Book(王迪) 数论,贪心
题目:http://www.tsinsen.com/A1504 A1504. Book(王迪) 时间限制:1.0s 内存限制:256.0MB Special Judge 总提交次数:359 ...
- Tornado源码探寻(请求到来)
上一篇中介绍了tornado框架在客户端请求之前所做的准备(下图1.2部分),本质上就是创建了一个socket服务端,并进行了IP和端口的绑定,但是未执行 socket的accept方法,也就是未获取 ...
- C语言宏与单井号(#)和双井号(##)
C(和C++)中的宏(Macro)属于编译器预处理的范畴,属于编译期概念(而非运行期概念).下面对常遇到的宏的使用问题做了简单总结.关于#和##在C语言的宏中,#的功能是将其后面的宏参数进行字符串化操 ...
- How to Validate XML using Java
Configure Java APIs (SAX, DOM, dom4j, XOM) using JAXP 1.3 to validate XML Documents with DTD and Sch ...
- hdoj 3785 寻找大富翁【优先队列+sort排序】
寻找大富翁 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submi ...