我遇到异常:
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
as:
compile 'com.google.android.gms:play-services:7.5.0'
但如果我把它改回:
compile 'com.google.android.gms:play-services:7.0.0'
一切工作正常,如果我在项目中添加 Google Cloud 后端模块,我也会面临同样的问题。
你的解决方案是here https://developers.google.com/android/guides/setup。
更具体地说,请参阅“选择性地将 API 编译到可执行文件中”部分here https://developers.google.com/android/guides/setup#split.
通过使用 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
希望这可以帮助。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)