简体   繁体   中英

How to import Facebook SDK into my android eclipse project

I'm a bit confused between 2 screen in eclipse:

在此处输入图片说明

在此处输入图片说明

I'm not sure how to import FB sd into my Android project properly.

What does "android" mean vs "Java build path" ?

As current configuration I get this error:

在此处输入图片说明

我不太明白这个问题,图片太小了,Facebook还提供了一个很好的教程 ,说明如何做到这一点,还请确保您使用的是Facebook的android支持jar。

First import it as a project into your eclipse and then give its reference to your project as you have shown in your first screen. If you have only jars file then add those jar to your libs folder and then follow steps of add to build path.

As the error says - there are 2 versions of a jar - android-support-v4.jar. Either make FB use your version of android-support-v4 or use FB's version of android-support-v4.jar in your project. The jar will be in project-name/libs folder.

从项目中删除android-support-v4.jar ,因为可能会出现jar不匹配的情况。将Facebook SDK添加为库项目后,再次不需要添加该支持jar文件。FacebookSDK已包含该库。如果android-support-v4.jar是较旧的版本,则可以对其进行更新。

You have 2 android support library with different keys. Right click on your FacebokSDK and project ---> Android tools ---> Add support Library

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM