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'.的更多相关文章

  1. 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 ...

  2. 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 ...

  3. Error:Execution failed for task ':app:dexDebug'.

    com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process ...

  4. Error:Execution failed for task ':app:clean'.

    运行时出现 Error:Execution failed for task ':app:clean'. 错误,Builld->Clean Project即可.

  5. Error:Execution failed for task ':app:transformClassesWithDexForDebug'.

    使用android studio 时,编译成功但用build apk时却报错 环境: android studio 1.5, jdk1.7 错误:Error:Execution failed for ...

  6. Android Studio 运行出现 Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.

    转载请标明出处: http://www.cnblogs.com/why168888/p/5978381.html 本文出自:[Edwin博客园] 我引用compile 'com.squareup.re ...

  7. Error:Execution failed for task ':app:transformClassesWithDexForDebug'解决记录

    转载请标明出处: http://blog.csdn.net/lxk_1993/article/details/50511172 本文出自:[lxk_1993的博客]:   3个错误non-zero e ...

  8. 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 ...

  9. 异常问题解决Error:Execution failed for task ':app:processDebugManifest'

    Error:Execution failed for task ':app:processDebugManifest' www.MyException.Cn  网友分享于:2015-12-28  浏览 ...

随机推荐

  1. bzoj1597

    首先不难想到排序,这种无规律的东西一般都要转化为有规律才好做 首先以x为第一关键字,y为第二关键字升序排序 拍完序我们发现,若存在两块土地i,j x[i]<=x[j],y[i]<=y[j] ...

  2. SharePoint 2010 母版页定制小思路介绍

    转:http://tech.ddvip.com/2013-11/1384521515206064.html 介绍:我们使用SharePoint2010做门户网站,经常需要定制母版页,但是2010提供的 ...

  3. 彻底卸载oracle10g

    如果Oracle安装在Windows上,那么删除起来特别麻烦,以下列出具体步骤: 软件环境: Windows 7.ORACLE 10.1.24:ORACLE安装路径为:C:/ORACLE 实现方法: ...

  4. android学习——ADT的离线安装

    前一篇讲解了ADT的在线安装,不过有的时候在线在线安装的速度很慢.所以今天学习一下ADT的离线安装: 首先 下载与SDK相对应的ADT(如果SDK是最新版的就下最新版ADT否则就把SDK更新到最新版以 ...

  5. OpenJDK 8 on Windows

    OpenJDK官网提供了非Windows已编译版本的下载. JDK 8的Windows安装版本目前网上提供有两种版本: 1.RED HAT发布的OpenJDK 8 Windows版 2.ojdkbui ...

  6. Matlab无法打开M文件的错误( Undefined function or method 'uiopen' for input arguments of type 'char)

    错误提示: Undefined function or method 'uiopen' for input arguments of type'char 解决方案: 运行命令 restoredefau ...

  7. Web开发需要关注的技术细节

    摘要:在网站发布前,开发者需要关注有许多的技术细节,比如接口设计.用户体验.安全性.Web标准.性能.SEO等,倘若一个疏忽就会影响到整体的体验效果.作为一名Web开发者,哪些技术细节需要考虑呢? [ ...

  8. (转载)VC/MFC 工具栏上动态添加组合框等控件的方法

    引言 工具条作为大多数标准的Windows应用程序的 一个重要组成部分,使其成为促进人机界面友好的一个重要工具.通过工具条极大方便了用户对程序的操作,但是在由Microsoft Visual C++开 ...

  9. Keepass 2.x 之 同步与触发器

    同步 之前用的 Keepass 1.x, 要实现工作电脑和个人电脑上的数据库文件同步,使用的是第三方的网盘同步.但有个问题就是,个人不习惯设置同步网盘开机启动,所以有时候工作电脑上的改动还没有同步上传 ...

  10. WE-1202 (JGX-X5 v1.3)刷openwrt

    当前固件版本显示 固件版本 RippleOS硬件型号 RippleTek WE-1202CPU型号是 MT7620N路由主板上面丝印是 JGX-X5  v1.3 买的时候选择的RippleOS固件,后 ...