难以导入Facebook的Andr​​oid的SDK到EclipseAndr、Facebook、oid、Eclipse

由网友(你是我の太阳)分享简介:我尝试从这里跟随Facebook的机器人教程:https://developers.facebook.com/docs/mobile/android/build/#sample我工作在Windows 7中。我已经安装了Git和克隆的混帐击运行此命令的GitHub的资源库 - > git的克隆混帐://github....

我尝试从这里跟随Facebook的机器人教程:https://developers.facebook.com/docs/mobile/android/build/#sample 我工作在Windows 7中。 我已经安装了Git和克隆的混帐击运行此命令的GitHub的资源库 - > git的克隆混帐://github.com/facebook/facebook-android-sdk.git

I try to follow the facebook-android tutorial from here: https://developers.facebook.com/docs/mobile/android/build/#sample I am working in windows 7. I have installed the Git and cloned the GitHub repository running this command in the git Bash -> git clone git://github.com/facebook/facebook-android-sdk.git

一切似乎都很好,我在我的用户文件夹中有文件夹Facebook的Andr​​oid的SDK。

Everything seemed fine and I got the folder "facebook-android-sdk" in my "Users" folder.

但是,当我尝试导入Eclipse工作区的项目,所以用它作为一个库,我不能使它发挥作用。我试过3件事情:

But when I try to import the project in eclipse workspace so to use it as a library I cannot make it work. I’ve tried 3 things:

从现有源代码的项目(如教程说),当我浏览到Facebook的Andr​​oid的SDK文件夹,并创建项目,我在我的cosole此消息:2011-12- 04 14点01分49秒 - com_facebook_android] AndroidManifest.xml文件丢失! 另外,在包浏览器,src文件夹似乎是空的。

Create the project from existing source (as the tutorial says), when I browse to the "facebook-android-sdk" folder and create the project, I get this message in my cosole: [2011-12-04 14:01:49 - com_facebook_android] AndroidManifest.xml file missing! Also in the package explorer, the src folder seems to be empty.

如果我尝试导入该项目时,我浏览我得到一个消息的文件夹没有项目被发现进口

If I try to import the project when I browse the folder I get a message "No projects are found to import"

我也试着做一个测试项目中,我复制了Android Facebook的SDK中的所有类,这样我可以使用它们。它一直工作到了一定程度,但它似乎并没有一个正确的做法。

I also tried to make a test project where I copied all the classes of the android facebook sdk so that I can use them. It worked up to a degree, but it does not seem a proper thing to do.

所以,我该怎么办错了吗?有没有别的东西我应该做使用Git仓库(我是完全新的GIT)?或者是有什么不对,我这样做,当我尝试导入项目?我在这里和在其他论坛上搜索这个问题,但没有找到令人满意的答案(或者也许我没有理解它)。请帮帮忙!

So what do I do wrong? Is there something else I should do using the git repository (I am completely new to git)? Or is there something wrong that I do when I try to import the project? I’ve searched the problem here and in other forums but didn’t find a satisfying answer (or maybe I did not understand it). Please help!

编辑:我已经试过一次4件事

I've tried one 4th thing

4:我抽取的jar出来我在1中创建的项目(即使它有一个误差)。这是工作方面,我可以编译Facebook的Andr​​oid的教程步骤6.2的code - https://developers.facebook.com/docs/mobile/android/build/#sample.到目前为止,似乎一切都OK。但我不知道这是正确的还是我应该在未来的问题。

4: I extracted the jar out of the project I created in 1 (even if it had an error). It is working in terms that I can compile the code of the facebook-android tutorial step 6.2 - https://developers.facebook.com/docs/mobile/android/build/#sample. So far it seems that everything goes ok. But I do not know if this is right or I should have problems in the future..

推荐答案

我有同样的问题。但现在我想我解决了这个问题,即使解决方案并不令人满意。 从现有的源项目为Facebook的教程说。然后做一个右击该项目并选择导入,选择常规 - >文件系统,进入下一步。现在点击浏览...,然后选择文件夹... / Facebook的Andr​​oid的SDK / Facebook上。重复与src和res文件夹这些步骤(右击这些文件夹的导入,选择src和资源文件夹... / Facebook的Andr​​oid的SDK /脸谱)。 现在,它的工作原理。我不知道为什么Eclipse不自动导入所有这些事情,在过去它工作得很好...

I had the same problem. But now I think I solved it, even if the solution is not satisfying. Create the project from existing source as the facebook tutorial says. Then make a right click on the project and choose "Import", choose "General" -> "File System" and go to "Next". Now click on "Browse..." and choose the folder .../facebook-android-sdk/facebook. Repeat these steps with the src and the res folder (right click on these folders for "Import", choosing the src and res folder in .../facebook-android-sdk/facebook). Now it works. I don't know why Eclipse doesn't import all these things automatically, in the past it worked fine...

阅读全文

相关推荐

最新文章