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 浏览 ...
随机推荐
- linux必会的60个命令
◆ 安装和登录命令:login.shutdown.halt.reboot.install.mount.umount.chsh.exit.last: ◆ 文件处理命令:file.mkdir.grep.d ...
- USACO3.34Home on the Range(DP)
之前做过一道类似的 国际象棋盘神马的.. 统计出以每个1作为右下角的最大正方形 那么以大于二到这个最大值之间为边的正方形都可以以这个为右下角 累加就可以了 dp[i][j] = min(dp[i-1] ...
- SSI指令使用详解(转)
什么是 SHTML使用SSI(Server Side Include)的html文件扩展名,SSI(Server Side Include),通常称为“服务器端嵌入”或者叫“服务器端包含”,是一种类似 ...
- codeforces --- 279C Ladder
C. Ladder time limit per test 2 seconds memory limit per test 256 megabytes input standard input out ...
- Design T-Shirt
Design T-Shirt Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)To ...
- Linux之sed详解
转载:http://blog.chinaunix.net/u/22677/showart_1076318.html 1.简介 sed是非交互式的编辑器.它不会修改文件,除非使用shell重定向来保 ...
- Spring之HelloWorld再起
第一步:打开File->New->Other…,选择Java Project,创建标准Java项目. 第二步:在项目下添加lib文件夹用于存放jar文件,resources用于存放xml配 ...
- 使用第三方CDN加速服务加载js/css
ASP.NET MVC 3.0 http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.unobtrusive-ajax.js http://ajax.aspnet ...
- vijosP1037搭建双塔
vijosP1037搭建双塔 链接:https://vijos.org/p/1037 [思路] DP. [代码] #include<iostream> #include<cstrin ...
- JavaScript高级程序设计47.pdf
触摸设备 iOS和Android设备的实现非常特别,因为这些设备没有鼠标,在面向iPhone和iPod中的Safari开发时,要记住以下几点 不支持dblclick事件,双击浏览器窗口会放大画面,没有 ...