Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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? 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.

like image 744
kasgoku Avatar asked Jan 27 '12 16:01

kasgoku


3 Answers

Yes! I just figured it out myself.

You need two jar files:

  1. facebooksdk.jar
  2. android-support-v4.jar

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.

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.

Good luck =)

like image 194
Knots Avatar answered Oct 05 '22 02:10

Knots


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. When I created an FB connected android app, I moved the files I needed into a package in my app.

like image 25
eosgood Avatar answered Oct 05 '22 01:10

eosgood


It looks like maven has them cached.

http://search.maven.org/remotecontent?filepath=com/facebook/android/facebook-android-sdk/4.4.0/facebook-android-sdk-4.4.0-sources.jar

like image 45
Tom Avatar answered Oct 05 '22 00:10

Tom