20

Hey I know this was asked before, but none of the solutions seem to help.

This is NOT a duplicate

I have used the Facebook SDK before on an earlier project, now I started a new one and I get this weird error.

  • I have set a reference to the library
  • I have set the Facebook SDK project as a library
  • I have tried deleting it and re-adding it according to the official documentation, and basically tried everything in this question.

Though I still get this error and can't find out why.

Worth to mention, when I tried to use the facebook class, it gave me an error with an option of "fix project", which I did and still didn't work, might be related?

Community
  • 1
  • 1
eric.itzhak
  • 15,752
  • 26
  • 89
  • 142

5 Answers5

60

This is common error. Just remove FacebookSDK project from Properties->Java Build Path->Projects . This project should be referenced from Properties->Android

For more information, see this answer: Could not find Library.apk!

Community
  • 1
  • 1
kolobok
  • 3,835
  • 3
  • 38
  • 54
  • @rottz This was answered much after I solved it, and it shouldn't be marked though it's a common solution as I didn't try it, and my solution (as bad as it is) did work. – eric.itzhak Dec 17 '13 at 16:00
1

Well, after alot of searches the only thing that worked for me is just creating a new project and copying all the files to it.

I tried avoiding it but that seems like the only thing that works =/

As there is no answer on this topic whatsoever, so if someone could find out a better solution - it will be very helpfull to the community

eric.itzhak
  • 15,752
  • 26
  • 89
  • 142
1

Hmm.. I just want to ask whether did you import the Facebook SDK into Eclipse itself? Because I had did a project using Facebook and the thing is that besides referencing, the guide I followed actually instructed that the SDK must be imported into the Eclipse.

You might probably want to have a look at this. Else, the other way is just like what you did, copying all the files.

1

Try deleting the Facebook application for Android (if you have one installed on your phone). This worked for me.

Rayhunter
  • 243
  • 3
  • 9
1

i dont know how this is happened but it works :

first : i have added all facebook3.0 related sample + facebookSDk projects in one workspace .

second : i have run a sample project . in which i found a .jar file : androiddependencies->facebooksdk.jar (note this exact path )

third :

1.) i created my project .

2.) inside this i have removed errors by :- FixProjectSetup (atLast position )

3.) i have added facebooksdk.jar by right_clicking at project->properties->android->by checking android 4.2 + reference the Facebooksdk -> done .

now i am able to create and run programs easily .

Tushar Pandey
  • 4,557
  • 4
  • 33
  • 50