[英]Android facebook SDK as JAR
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? 有没有将facebook SDK库项目构建到JAR文件中(如ADT 16对库项目做的那样)并将其添加到项目中? I am not changing anything in the facebook SDK so don't need to have it added as a library project. 我没有更改facebook SDK中的任何内容,因此不需要将其添加为库项目。 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? 到目前为止它一直对我很好,我想知道这是否是使用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. 它加快了构建过程,因为Eclipse不必解析库项目中的所有资源。
Yes! 是! I just figured it out myself. 我自己想通了。
You need two jar files: 你需要两个jar文件:
Option 1 选项1
The first can be found in the bin folder, the latter in the Android Dependencies folder. 第一个可以在bin文件夹中找到,后者在Android Dependencies文件夹中找到。 (Of the FacebookSDK project) After adding them both as libraries to my project (Project --> properties --> Java Build Path --> Libraries) it actually worked. (在FacebookSDK项目中)将它们作为库添加到我的项目(项目 - >属性 - > Java构建路径 - >库)后,它实际上工作。
Option 2 选项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. 另一种方法是复制粘贴facebooksdk.jar并通过右键单击项目 - > Android工具 - >添加支持库获取android-support-v4.jar。
Good luck =) 祝你好运=)
Kasgoku, Kasgoku,
The code is provided as a project for easy viewing of the classes. 代码作为项目提供,以便于查看类。 Adding it as an included jar or just moving the source into your project also works. 将其添加为包含的jar或仅将源移动到项目中也可以。 When I created an FB connected android app, I moved the files I needed into a package in my app. 当我创建一个FB连接的Android应用程序时,我将我需要的文件移动到我的应用程序中的包中。
It looks like maven has them cached. 看起来maven已经缓存了它们。
http://search.maven.org/remotecontent?filepath=com/facebook/android/facebook-android-sdk/4.4.0/facebook-android-sdk-4.4.0-sources.jar http://search.maven.org/remotecontent?filepath=com/facebook/android/facebook-android-sdk/4.4.0/facebook-android-sdk-4.4.0-sources.jar
You can create a jar file : 您可以创建一个jar文件:
Well guys you dont need to manually make a .jar file out of facebook-android-sdk . 好吧,你们不需要手动制作一个.jar文件来自facebook-android-sdk 。 You can use easyfacebook.jar . 你可以使用easyfacebook.jar 。 It currently supports: 它目前支持:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.