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 浏览 ...
随机推荐
- 关于Session
转自:http://blog.csdn.net/wang379275614/article/details/9627755 Session理解: Session:在计算机中,尤其是在网络应用中,称 ...
- Delta-wave
Delta-wave Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total ...
- DBA的那些事
--Author:Leshami --Blog :http://blog.csdn.ne/leshami 说起DBA,全称是Database Administrator,不是Doctor of ...
- Problem 2214 Knapsack problem 福建第六届省赛
题目链接:http://acm.fzu.edu.cn/problem.php?pid=2214 题目大意:给你T组数据,每组有n个物品,一个背包容量B,每件有体积和价值.问你这个背包容纳的物品最大价值 ...
- SQL SERVER 自定义函数 整数转成指定长度的16进制 转换成指定长度的16进制 不足补0
最近做项目扩展的时候,遇到问题就是将整型转换成指定长度的16进制 刚开始就是直接使用 cast(12 as varbinary(4))但是发现这个不能解决我的问题 所以就上网搜了一下,然后改了改,下面 ...
- Kbuild文件
3 Kbuild文件 大部分内核中的Makefile都是使用Kbuild组织结构的Kbuild Makefile.这章将介绍Kbuild Makefile的语法. 对于Kbuild文件名来讲,Kbui ...
- OpenSUSE SuSEfirewall2
1,修改SuSEfirewall2配置文件放行相应的端口方法vim /etc/sysconfig/SuSEfirewall2#TCP端口的情况:FW_SERVICES_EXT_TCP ="2 ...
- JSON AND BSON
JSON JavaScript Object Notation (JSON) is an open, human and machine-readable standard that facilita ...
- 一次服务器CPU占用率高的定位分析
现象: 当前项目启动一段时间,有一个服务导致CPU使用率持续超过30% 环境:Windows 7, CPU: 8核, 内存: 8g内存 定位过程: 启动项目,查看Java进程ID 查看Event P ...
- jquery.qrcode.min.js生成二维码 通过前端实现二维码生成
主体代码: <!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <tit ...