Android facebook SDK 作为 JAR [英] Android facebook SDK as JAR
问题描述
将 facebook SDK 库项目构建到 JAR 文件中(就像 ADT 16 对库项目所做的那样)并将其添加到您的项目中是否有任何缺点?我没有更改 facebook SDK 中的任何内容,因此不需要将其添加为库项目.到目前为止,它对我来说一直很好,我想知道这是否是使用 facebook SDK 的开发人员使用的常见做法?它大大加快了构建过程,因为 Eclipse 不必解析库项目中的所有资源.
Are there any cons of build the facebook SDK library project into a JAR file(as ADT 16 does with library projects) and adding it to your project? I am not changing anything in the facebook SDK so don't need to have it added as a library project. So far it has been working fine for me and I am wondering whether this is a common practice used by developers using the facebook SDK? It speeds up the build process quite a bit because Eclipse doesn't have to resolve all of the resources in the library projects.
推荐答案
是的!我只是自己想出来的.
Yes! I just figured it out myself.
你需要两个jar文件:
You need two jar files:
- facebooksdk.jar
- android-support-v4.jar
选项 1
第一个可以在 bin 文件夹中找到,后者在 Android Dependencies 文件夹中.(FacebookSDK 项目的)在将它们都作为库添加到我的项目(项目 --> 属性 --> Java 构建路径 --> 库)之后,它实际上工作了.
Option 1
The first can be found in the bin folder, the latter in the Android Dependencies folder. (Of the FacebookSDK project)
After adding them both as libraries to my project (Project --> properties --> Java Build Path --> Libraries) it actually worked.
选项 2
另一种方法是复制粘贴 facebooksdk.jar 并通过右键单击项目 --> Android 工具 --> 添加支持库来获取 android-support-v4.jar.
Option 2
Another way is to copy paste the facebooksdk.jar and get the android-support-v4.jar via Right-click on project --> Android Tools --> Add Support Library.
祝你好运=)
这篇关于Android facebook SDK 作为 JAR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!