Android Studio BUILD FAILED finished with non-zero exit value
2016-03-03 17:24
639 查看
Android Studio build failed
Android studio gradle 编译失败 错误提示:
finished with non-zero exit value 1
finished with non-zero exit value 2
finished with non-zero exit value 3
![](http://img.blog.csdn.net/20160303163951793?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
遇到该异常首先
然后
如果还 build 失败原因可能是找不到相对应的资源 导入相应了包后解决:
![](http://img.blog.csdn.net/20160303164149202?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
( 注 : 图1 )
其次 :寻找解决方案的时候在网上还找到个 finished with non-zero exit value 1 可能出现的其它情况: 电脑内存不足 导致studio出现build failed解决方案是 在build.gradle 的 dexOptions 增大内存设置 ( xx 替换为内存大小 )
详情链接: http://blog.csdn.net/serapme/article/details/46685557
问题原因 : jar 包冲突 , 工程里面有引用了多个相同的jar包 解决方法:在 project > build.gradle 文件 > dependencies 里 将多余的包删除即可 如上图 ( 图1 )
参考文章:http://stackoverflow.com/questions/29720831/finished-with-non-zero-exit-value-3http://stackoverflow.com/questions/30483827/android-studio-java-exe-finished-with-non-zero-exit-value-3 http://stackoverflow.com/questions/29249986/finished-with-non-zero-exit-value
每日精进
Android studio gradle 编译失败 错误提示:
finished with non-zero exit value 1
finished with non-zero exit value 2
finished with non-zero exit value 3
finished with non-zero exit value 1
遇到该异常首先
Build -> Clean Project
然后
Build -> Rebuild Project
如果还 build 失败原因可能是找不到相对应的资源 导入相应了包后解决:
( 注 : 图1 )
其次 :寻找解决方案的时候在网上还找到个 finished with non-zero exit value 1 可能出现的其它情况: 电脑内存不足 导致studio出现build failed解决方案是 在build.gradle 的 dexOptions 增大内存设置 ( xx 替换为内存大小 )
dexOptions { javaMaxHeapSize "xx" }
详情链接: http://blog.csdn.net/serapme/article/details/46685557
finished with non-zero exit value 2
Error:Execution failed for task > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2 Android Studio fails to debug with error org.gradle.process.internal.ExecException
问题原因 : jar 包冲突 , 工程里面有引用了多个相同的jar包 解决方法:在 project > build.gradle 文件 > dependencies 里 将多余的包删除即可 如上图 ( 图1 )
finished with non-zero exit value 3
解决方案有:1) 增加内存(参考 value2)2) 替换"compile fileTree(dir: 'libs', include: ['*.jar'])"为
"provided fileTree(dir: 'libs', include: ['*.jar'])".
参考文章:http://stackoverflow.com/questions/29720831/finished-with-non-zero-exit-value-3http://stackoverflow.com/questions/30483827/android-studio-java-exe-finished-with-non-zero-exit-value-3 http://stackoverflow.com/questions/29249986/finished-with-non-zero-exit-value
每日精进
// ┏┓ ┏┓
//┏┛┻━━━┛┻┓
//┃ ┃
//┃ ━ ┃
//┃ ┳┛ ┗┳ ┃
//┃ ┃
//┃ ┻ ┃
//┃ ┃
//┗━┓ ┏━┛
// ┃ ┃ 神兽保佑
// ┃ ┃ 代码无BUG!
// ┃ ┗━━━┓
// ┃ ┣┓
// ┃ ┏┛
// ┗┓┓┏━┳┓┏┛
// ┃┫┫ ┃┫┫
// ┗┻┛ ┗┻┛
相关文章推荐
- JAVA:string中的copyValueOf方法
- Ubuntu LiveSuit V3.06不能烧写问题
- 系统API:UIView阻尼动画
- UIImage 图片处理:截图,缩放,设定大小,存储
- 设置cookie值(key,value,过期天数,域名)functionsetCookie(cookieName, cookieValue, expire
- 【UI】【View】自定义布局方法与注意事项(二)
- iOS学习之路-UIPickerView初认识与使用
- UITableView点击切换状态分析
- 获取当前UITableViewCell在TableView上的索引
- iOS:设置UILabel行距实例
- How to remove the bottom gap of UIPageViewController
- 开始学习SOUI.
- Android优化——UI检视利器:Hierarchy Viewer
- PWA PSI statusingclient.UpdateStatus更新任务页面的AssnCustomFields的TextValue值
- @PathVariable和@RequestParam的区别,@SessionAttributes
- Android Volley完全解析(三),定制自己的Request
- ffplay中的FrameQueue的自我理解
- MVC5 + EF6 入门完整教程二:从前端的UI开始
- 一些常见的蓝牙(Bluetooth)相关的技术术语表
- GDB display memory value