Fackbook SDK throws Error

允我心安 提交于 2019-12-20 02:26:35

问题


I have downloaded and imported android facebook sdk 3.14. It is throwing over 150 errors.

e.g.

AppLink cannot be resolved to a type
AppLinkResolver cannot be resolved to a type
Fragment cannot be resolved to a type

etc.

I have not even begun implementing the code yet. Can somebody help me out?


回答1:


These steps worked for me:

  • Download the facebook sdk from here: https://developers.facebook.com/docs/android/
  • In Eclipse:
    • Import -> Existing Projects into Workspace
    • Go to the sdk folder location
    • Deselect All and select only 'FacebooSDK' (this if you don't need any samples)
  • After the project was imported, clean the project and try to build

It should work now, but if you encounter any further problems, maybe you'll find some help here: https://developers.facebook.com/docs/android/getting-started/




回答2:


I just found the solution!
As you can notice, there is no libs folder in your SDK project.
Create that folder and paste in it android-support-v4.jar and bolts-android-1.1.2.jar that exisit in this link.
Good luck



来源:https://stackoverflow.com/questions/23856540/fackbook-sdk-throws-error

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