ProcessException:ExecException:进程’command’/ Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Content/Home/bin/java

我得到例外:

Error:Execution Failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

在我将Google Play服务更新为7.5.0之后:

compile 'com.google.android.gms:play-services:7.5.0'

但如果我改回来:

compile 'com.google.android.gms:play-services:7.0.0'

一切正常,如果我在项目中添加Google Cloud后端模块,我也面临同样的问题.

最佳答案
您的解决方案是here.
更具体地说,在“选择性地将API编译到您的可执行文件”部分here中.

通过使用com.google.android.gms:play-services:7.5.0,您正在使用所有Google Play服务API进行编译.
您应该使用所需的Google Play服务API.

例如,如果您需要Google,则使用com.google.android.gms:play-services-plus:7.5.0

希望这可以帮助.

相关文章

Android性能优化——之控件的优化 前面讲了图像的优化,接下...
前言 上一篇已经讲了如何实现textView中粗字体效果,里面主要...
最近项目重构,涉及到了数据库和文件下载,发现GreenDao这个...
WebView加载页面的两种方式 一、加载网络页面 加载网络页面,...
给APP全局设置字体主要分为两个方面来介绍 一、给原生界面设...
前言 最近UI大牛出了一版新的效果图,按照IOS的效果做的,页...