Android / Facebook: the required library is not in the project

I imported the SDK to download on it: https://github.com/facebook/facebook-android-sdk/commits/master and following the instructions http://www.android10.org/index.php/articleslibraries/290-facebook- integration-in-your-android-application

I added FacebookSDK as a library for my current project.

But I have errors in all imported samples when I import the facebook project: "The FacebookSDK project is missing, the required libraries libs / android-support-v4.jar" is displayed as one error for the FacebookSDK project And then I have a "Container" Android dependencies "refers to a non-existing library C: ... \ facebook-android-sdk-master \ facebook \ bin \ facebooksdk.jar" for all facebook sample projects that are in the facebook project.

I tried to clean up the project in order to go to "Properties"> "Java Compiler"> "Compiler Compliance Level 1.6" (because I need level 5.0 or 6.0, not 1.7, so I downloaded jdk 1.6) tried to do Android Tools> Fix project properties

But I still have the same erros ... Can someone tell me what I should do? Thanks

+4
source share
2 answers

I think you need to configure the Buildpath of your project. Do it as below:

RightClick on your Project -> Build Path -> Configure Buildpath 

The window will then be displayed using Libraries as one of the tabs. Select this tab.

Then click Add External Jars in the list of buttons on the right. Add the required jars and select OK. After cleaning and creating your project.

Hope this helps you.

+17
source

I had the same problem and I imported the FacebookSDK project and all the sample projects with it as described at this beginning https://developers.facebook.com/docs/android/getting-started . Because of this, none of the projects compiled as samples depends on the facebooksdk.jar and FacebookSDK projects, which are not built due to errors in other projects. Do it:

  • Close all sample projects
  • Just a clean and built FacebookSDK project
  • You should see facebookdk.jar in the bin folder
  • Open all other projects, clean and build

All library error is missing.

+3
source

All Articles