无法添加Facebook的SDK项目 [英] Unable to add facebook sdk to project

查看:261
本文介绍了无法添加Facebook的SDK项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我导入Facebook的SDK为库项目到Eclipse中。我做了检查复制项目进入工作区,并通过保留选择它,以及(出于某种原因,说明说,我必须取消它)。

I imported the Facebook SDK as library project into eclipse. I did it by checking Copy projects into Workspace and by leaving it unchecked as well (for some reason the description says that I must uncheck it).

我试图导入现有项目到工作区现有的Andr​​oid code进入工作区以及

该库复选框在属性检查。
Facebook的SDK从未导入到此工作空间呢。

The library checkbox is checked in the properties. A Facebook sdk has never been imported into this workspace yet.

我创建了一个运行平稳,没有Facebook的一个新项目。在属性中,Android的标签,我增加了库项目。这表明一个绿色的勾,但是当我再次打开该选项卡,它显示了一个红色的X。
该项目的目标是API级别19,Facebook的库的目标是API 8级。我还与API级别10试过
我使用Java编译器1.6在项目和库两者。

I created a new project that runs smoothly without Facebook. In the properties, Android tab, I added the library project. It showed a green tick, but when I open that tab again, it shows a red x. The target of the project is API level 19, the target of the facebook library is API level 8. I also tried it with API level 10 I am using Java compiler 1.6 in both the project and the library.

我不明白的是,随SDK附带的示例项目似乎已经成功导入了SDK(绿色的勾),但它们都指向同一个问题的进口android.support不能得到解决上导入android.support.v4.app.FragmentActivity ;我不得不悬停在该行,然后单击修复项目设置,以使他们的工作。然后我去为属性 - > Java构建路径 - >在线订单和出口 - >点击V4支持库复选框即可。所以至少他们的工作。为什么他们成功地加载Facebook的SDK,为什么我的应用程序无法做到这一点?

What I don't understand is that the sample projects that came with the SDK seem to have successfully imported the SDK (green tick), however they all point to the same problem "The import android.support cannot be resolved" on import android.support.v4.app.FragmentActivity; I had to hover over the line and click Fix Project setup to make them work. Then I went to Properties -> Java Build Path -> Order and Export -> clicked v4 support library checkbox. So at least they work. Why do they successfully load the Facebook SDK and why is my app unable to do it?

Facebook的SDK没有libs文件夹,所以我想不同的V4的支持库之间的干扰是不可能的。

The Facebook SDK has no libs folder so I guess an interference between different v4 support libraries is out of the question.

我在两个不同的计算机尝试这一点。

I have tried this on two different computers as well.

我决定从步骤安装Android的步骤,而不是ADT包。我下载的是Eclipse的Juno Java开发人员,安装了最新的Java版本(1.8)并安装了Android包。创建一个新的项目,进口的Facebook SDK 3.5(试过3.0.2和3.8以及)。我仍然得到红色的X。

I decided to install Android from step to step instead of the ADT Bundle. I downloaded Eclipse Juno for Java Developers, installed the newest Java version (1.8) and installed the Android packages. Created a new project and imported the facebook sdk 3.5 (tried 3.0.2 and 3.8 as well). I still get the red X.

我AP preciate任何帮助。

I appreciate any help.

推荐答案

我遇到了这个问题半年后,我的前面的答案是没有帮助的。诀窍在于,你需要有相同的驱动器为您的项目,这是通常是C的库:驱动器。就这样。谢谢你的Facebook不通知我们这个..

I ran into this issue half a year later and my earlier answer was of no help. The trick is that you need to have the library on the same drive as your project, which is usually the C: drive. That's all. Thank you Facebook for not notifying us about this..

这篇关于无法添加Facebook的SDK项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆