AndroidStudio使用备忘:报错finished with non-zero exit value 2
来源:互联网 发布:网络语wink是什么意思 编辑:程序博客网 时间:2024/06/06 16:53
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':***:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_80\bin\java.exe'' finished with non-zero exit value 2
* Try:
* What went wrong:
Execution failed for task ':***:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_80\bin\java.exe'' finished with non-zero exit value 2
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
网上的很多说是有重复的jar包,V4、V7等原因,我这个都没发现。
本人的解决方法:在主工程的build.gradle文件中增加如下代码解决,
multiDexEnabled true
作用:允许AndroidStudio对发布的项目进行分包处理,发不出的APK会有两个dex文件,
分析原因可能是项目代码过于庞大,方法超过65536,但不知道为什么AS没有报65536错误,主工程引用了好几个Lib库。
注:增加这个代码后,需要改变build tool版本到21以上,提示说是21版本编译才开始支持分包。
0 0
- AndroidStudio使用备忘:报错finished with non-zero exit value 2
- AndroidStudio 报错 finished with non-zero exit value 2
- 报错:finished with non-zero exit value 2
- AndroidStudio 导包报 finished with non-zero exit value 2
- androidStudio中出现finished with non-zero exit value 2 或者 finished with non-zero exit value 1
- finished with non-zero exit value 2
- finished with non-zero exit value 2
- ' finished with non-zero exit value 2
- finished with non-zero exit value 2
- finished with non-zero exit value 2
- finished with non-zero exit value 2
- finished with non-zero exit value 2
- finished with non-zero exit value 2
- finished with non-zero exit value 2
- finished with non-zero exit value 2
- finished with non-zero exit value 2
- AndroidStudio多jar包编译报:java.exe'' finished with non-zero exit value
- 关于AndroidStudio的Messages中报mergeDebugResources...finished with non-zero exit value 42错误
- Django的Helloworld
- soj 3085 windy's cake V 单调栈的应用
- tableView Crash
- 关于mysql数据库不出现名为mysql数据库的解决办法
- XAMPP: Another web server is already running
- AndroidStudio使用备忘:报错finished with non-zero exit value 2
- 服务器、客户端双认证(2)
- Windows调试Postgresql
- 两个路由器之间静态ARP和代理ARP配置
- 换个格式输出整数
- 文件操作
- LeetCode:Summary Ranges
- 一个自己编写的象棋程序,可实现走棋谱(如炮二平五),工程完成度%96,跟大家分享一下,下一步要做残局,欢迎交流
- Android动画之属性动画(Property Animation)(一)