使用Facebook SDK编译应用程序时出错 [英] Error on compile app with Facebook SDK

查看:170
本文介绍了使用Facebook SDK编译应用程序时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

$ b我正在尝试将Facebook整合到我的AOS应用程序中,而且我收到这个错误,我不知道如何解决它。 $ b

错误:执行失败的任务':app:transformClassesWithDexForDebug'。
com.android.build.api.transform.TransformException:com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:Process'command'/ Library / Java / JavaVirtualMachines / jdk1 .7.0_75.jdk / Contents / Home / bin / java完成了非零退出值2


我修改了我的应用程序|毕业文件如此处所述



更新
此应用中使用的Play服务




编译com.google。 android.gms:play-services:8.4.0'
compile'c​​om.google.android.gms:play-services-ads:8.4.0'
compile'c​​om.google.android.gms: play-services-identity:8.4.0'
compile'c​​om.google.android.gms:play-services-gcm:8.4.0'



任何想法?
谢谢,

解决方案

我面对同样的问题。我通过删除不需要的播放服务来解决

  //编译com.google.android.gms:play-services:8.4。 0'
//不要直接使用播放服务。只使用你想要的
编译'com.google.android.gms:play-services-ads:8.4.0'
compile'c​​om.google.android.gms:play-services-identity: 8.4.0'
编译'com.google.android.gms:play-services-gcm:8.4.0'

播放服务拥有15多个支持库,所以您只需使用您想要的全部播放服务



由Google服务推荐
请在这里


选择性地将API编译成可执行文件



在6.5之前的Google Play服务版本中,您必须编译
整个包的API到您的应用程序在某些情况下,这样做使
更难以将您的应用程序中的方法数量(包括
框架API,库方法和您自己的代码)保留在65,536
限制之下。 / p>

从版本6.5起,您可以选择性地将Google Play
服务API编译到您的应用程序中。例如,要仅包含Google
Fit和Android Wear API,请在
build.gradle文件中替换以下行:



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



这些行:



编译'com.google.android.gms:play-services-fitness:8.4.0'



编译'com.google.android.gms:play-services-wearable :8.4.0'



显示了在编译
您的应用程序时可以包括的单独API的列表,以及如何在build.gradle中描述它们文件。一些API>没有单独的库;通过包括基础
库来包含它们。 (当您包含一个具有单独库的API
时,会自动包含此库。)



I'm trying to integrate Facebook in my AOS app and I'm getting this error that I can't figure out how to fix it.

Error:Execution failed for task ':app:transformClassesWithDexForDebug'. com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

I modified my app | gradle file as described here

UPDATE Play Services used in this app

compile 'com.google.android.gms:play-services:8.4.0' compile 'com.google.android.gms:play-services-ads:8.4.0' compile 'com.google.android.gms:play-services-identity:8.4.0' compile 'com.google.android.gms:play-services-gcm:8.4.0'

Any ideas? Thanks,

解决方案

I faced the same issue . I solve by by removing unwanted play services

//compile 'com.google.android.gms:play-services:8.4.0'
//Don't use play services directly. use only what ever you want
compile 'com.google.android.gms:play-services-ads:8.4.0'
compile 'com.google.android.gms:play-services-identity:8.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'

Play services having 15+ support libs so you have to use only what you want dont add full play services

Suggested by google service Check Here

Selectively compiling APIs into your executable

In versions of Google Play services prior to 6.5, you had to compile the entire package of APIs into your app. In some cases, doing so made it more difficult to keep the number of methods in your app (including framework APIs, library methods, and your own code) under the 65,536 limit.

From version 6.5, you can instead selectively compile Google Play service APIs into your app. For example, to include only the Google Fit and Android Wear APIs, replace the following line in your build.gradle file:

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

with these lines:

compile 'com.google.android.gms:play-services-fitness:8.4.0'

compile 'com.google.android.gms:play-services-wearable:8.4.0'

shows a list of the separate APIs that you can include when compiling your app, and how to describe them in your build.gradle file. Some APIs > do not have a separate library; include them by including the base library. (This lib is automatically included when you include an API that does have a separate library.)

这篇关于使用Facebook SDK编译应用程序时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆