Could not find Facebook SDK.apk

时光怂恿深爱的人放手 提交于 2019-11-29 06:02:29

问题


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?


回答1:


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!




回答2:


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




回答3:


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.




回答4:


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




回答5:


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 .



来源:https://stackoverflow.com/questions/10971904/could-not-find-facebook-sdk-apk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!