Android studio中的一次编译报错’Error:Execution failed for task ':app:transformClassesWithDexForDebug‘,困扰了两天
先说下背景:随着各种第三方框架的使用,studio在编译打包成apk时,在dex如果发现有相同的jar包,不能创建dalvik虚拟机。一个apk,就是一个运行在linux上的一个虚拟机。
上图就是一直报错的问题,说是一个致命的错误,不能创建JVM。
找了下stackoverflow,发现这样的问题比比皆是,确没有一个解决我的问题的。有的说是AS2.1中的gradle和jdk不兼容,我看有1.8出这个问题,也是1.7出这个问题,先排除了jdk问题。然后以有人说是有相同的包导致的。我仔细检查了下。发现也没有相同的包啊。。
正在绝望的时候,再看了下这个错误。有一行“Invalid maxinum heap size:-Xmx4g”
然后是这里注释下,天啊,竟然编译通过了!
虽然不是技术上碰到的难题,也因为这种问题,让我竟受折磨。所以,必须让它上到我碰到的坑笔记中。
Android studio中的一次编译报错’Error:Execution failed for task ':app:transformClassesWithDexForDebug‘,困扰了两天的更多相关文章
- 安卓中运行报错Error:Execution failed for task ':app:transformClassesWithDexForDebug'解决
在androidstuio中运行我的未完项目,报错: Error:Execution failed for task ':app:transformClassesWithDexForDebug'.&g ...
- cordova编译报错:Execution failed for task ':processDebugResources'
cordova编译报错:Execution failed for task ':processDebugResources' 引发这个错误的最扩祸首就是一个中文命名的文件,不知道什么时候加入的,我写了 ...
- Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.Exec
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.> com.android.build.api.tr ...
- 【Android】AndroidStudio打包apk出现的一些问题 `Error:Execution failed for task ':app:lintVitalRelease'.
作者:程序员小冰,CSDN博客:http://blog.csdn.net/qq_21376985, QQ986945193 公众号:程序员小冰 1,错误代码: `Error:Execution fai ...
- 关于android studio 出现Error:Execution failed for task ':app:preDebugAndroidTestBuild'. 的解决办法
Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency 2018年 ...
- 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 ...
- Android Studio 编译错误 Error:Execution failed for task ':app:buildInfoDebugLoader'.
今天来到打开昨天的项目运行正常,然后改动了一点代码编译报错: Error:Execution failed for task ':app:buildInfoDebugLoader'. > Exc ...
- Android中使用databinding编译时出现的error:Execution failed for task ':app:dataBindingProcessLayoutsDebug'
Windows环境下使用svn对AndroidStudio更新代码时,总会在源文件中出现一堆乱码,尤其是xml文件中的乱码,不仅找起来费劲,改起来更费劲. 最近从svn更新代码之后,编译时出现了下面这 ...
- Android Studio Error:Execution failed for task ':app:preDebugAndroidTestBuild'.彻底解决的方法以及修改AScompileSDKVersion
Error Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency ...
随机推荐
- 自调用匿名函数和js的Module模式
编写自调用匿名函数的结构一般如下: :(function( window, undefined ) { // your code })(window); 传入的参数window,和参数列表中的unde ...
- Java线程池使用和常用参数
多线程问题: 1.java中为什么要使用多线程使用多线程,可以把一些大任务分解成多个小任务来执行,多个小任务之间互不影像,同时进行,这样,充分利用了cpu资源. 2.java中简单的实现多线程的方式 ...
- Exception 的 toString() 方法和 getMessage() 方法的区别
Exception 的 toString() 方法和 getMessage() 方法的区别: 在开发的过程中打印错误日志时尽量使用e.toString() 方法, 因为当错误为空指针时 e.getMe ...
- Luogu P3740 [HAOI2014]贴海报_线段树
线段树版的海报 实际上这个与普通的线段树相差不大,只是貌似数据太水,暴力都可以过啊 本来以为要离散的,结果没打就A了 #include<iostream> #include<cstd ...
- JAVA 第二天 内部类
package com.company; /** * Created by Administrator on 2016/8/23. */ public class Outter {//生成的字节码文件 ...
- python学习之路基础篇(第五篇)
前四天课程回顾 1.python简介 2.python基本数据类型 类: int:整型 | str:字符串 | list:列表 |tuple:元组 |dict:字典 | set:集合 对象: li = ...
- windows下 gvim8.0 编译器配置
最近由于各种原因,IDE从source insight换成了vim,参考了诸多博客的文章,折腾了好久折腾了个大概的样子,现在总结一下经验: 主要参考: 改造vim变成source insight Wi ...
- android Git命令家底儿及Git数据通信原理详解
声明:本文为CSDN原创投稿文章,未经许可,禁止任何形式的转载. 现在大部分使用的都是SVN,也有一部分迁移了Git,虽然挺好的,不过还有其它很多版本控制的工具,并没有谁最好用,最重要的是适合自己的公 ...
- Writing Sentences [1]
1) try 'there will be' instead of 'then' In homogeneity MRF, if and , there will be even if . 2) in ...
- 给定一个实数数组,按序排列(从小到大),从数组从找出若干个数,使得这若干个数的和与M最为接近,描述一个算法,并给出算法的复杂度。
有N个正实数(注意是实数,大小升序排列) x1 , x2 ... xN,另有一个实数M. 需要选出若干个x,使这几个x的和与 M 最接近. 请描述实现算法,并指出算法复杂度. #define M 8 ...