Android Gradle 编译错误Java finished with non-zero exit value 2
出现这个错误主要有两类错误
- 依赖包重复
- 方法数超过65K
针对第一种错误,可能是由于build.gradle里写了
compile fileTree(dir: 'libs', include: ['*.jar'])
这种方式,同时又加了单独的依赖
针对第二种错误原因,使用multidex打包可以解决问题,在build.gradle里添加
defaultConfig { multiDexEnabled true }
即可。
解决方法整理自:
http://stackoverflow.com/questions/29756188/java-finished-with-non-zero-exit-value-2-android-gradle
原文链接:http://www.jianshu.com/p/4768fe43079a
著作权归作者所有,转载请联系作者获得授权,并标注“简书作者”。
Android Gradle 编译错误Java finished with non-zero exit value 2的更多相关文章
- android - gradle编译错误 exit value 1,2,3总结
在使用jenkins,使用gradle编译的时候总会出现一些问题,下面是几个常见问题的解决方法. 被编译的代码或资源有问题( finished with non-zero exit value 1): ...
- 【Android】Android studio 编译问题:finished with non-zero exit value 2
1.Android studio 编译问题:finished with non-zero exit value 2 问题: Error:Execution failed for task ':andr ...
- assets中放入中文文件名导致Android Studio编译错误
一个android项目突然出现编译错误,如下: :app:processDebugResources FAILED FAILURE: Build failed with an exception. * ...
- eclipse 编译android程序 编译错误
windows->show view -> problems, 这个窗口的内容即为 编译错误的内容.
- 我的Android进阶之旅------>Android编译错误java.util.zip.ZipException: duplicate entry的解决方法
今天在Android Studio中把另外一个项目引入当前项目,编译的时候出现了java.util.zip.ZipException: duplicate entry错误. 错误如下所示: FAILU ...
- 我的Android进阶之旅------>Android编译错误java.util.zip.ZipException: duplicate entry的解决方法
今天在Android Studio中把另外一个项目引入当前项目,编译的时候出现了java.util.zip.ZipException: duplicate entry错误. 错误例如以下所看到的: F ...
- 开发错误12:gradle编译错误:Conflict with dependency com.android.support:support-annotations
在build.gradle中的configurations.all {}下添加:resolutionStrategy.force 'com.android.support:support-annota ...
- Android studio Gradle编译错误: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 400 Bad Reques
两种处理方法: 1.修改distributionUrl链接 gradle-wrapper.properties文件 distributionUrl=https\://services.gradle.o ...
- gradle 编译 "aapt.exe'' finished with non-zero exit value 1 问题
升级了一下android studio的版本,从3.0升级到3.3,升级过后,编译确实快了不少,但项目导入后一直报 "aapt.exe'' finished with non-zero ex ...
随机推荐
- UVALive 6884 GREAT + SWERC = PORTO dfs模拟
题目连接: https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show ...
- Codeforces Round #318 [RussianCodeCup Thanks-Round] (Div. 2) A. Bear and Elections 优先队列
A. Bear and Elections ...
- loj 1046(bfs)
题目链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=26766 思路:由于数据不是很大,我们可以枚举骑士最后聚集的位置,然 ...
- _EPROCESS结构简单了解!
_EPROCESS结构简单了解! lkd> dt _EPROCESSnt!_EPROCESS +0x000 Pcb : _KPROCESS +0x06c Pro ...
- VS制作软件安装项目,版本控制和软件升级
具体如何利用VS制作安装项目,请到我的CSDN地址下载超详细的文档(该文档来自网络) http://download.csdn.net/detail/u012373717/8723335 我要说的是版 ...
- 【转】reduce端缓存数据过多出现FGC,导致reduce生成的数据无法写到hdfs
转自 http://blog.csdn.net/bigdatahappy/article/details/41726389 转这个目的,是因为该贴子中调优思路不错,值得学习 搜索推荐有一个job,1 ...
- python 添加类属性
类属性必须赋值. 创建类属性 类是模板,而实例则是根据类创建的对象. 绑定在一个实例上的属性不会影响其他实例,但是,类本身也是一个对象,如果在类上绑定一个属性,则所有实例都可以访问类的属性,并且,所有 ...
- CodeForces 304C
E - E Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Submit Statu ...
- Android 设计中的.9.png
在 Android 的设计过程中,为了适配不同的手机分辨率,图片大多需要拉伸或者压缩,这样就出现了可以任意调整大小的一种图片格式“.9.png”.这种图片是用于Android开发的一种特殊的图片格式, ...
- ural 1221. Malevich Strikes Back!
1221. Malevich Strikes Back! Time limit: 1.0 secondMemory limit: 64 MB After the greatest success of ...