简体   繁体   English

Android Facebook-SDK设置无法正常运行

[英]Android Facebook-SDK setup does not work as intended

according to: https://developers.facebook.com/docs/mobile/android/build/#sample 根据: https : //developers.facebook.com/docs/mobile/android/build/#sample
I did the following (short form): 我做了以下(简短形式):
-get a clone of the git repo -获取git repo的克隆
-start a new android project using "Create project from existing source" -使用“从现有来源创建项目”启动一个新的android项目
-referenced to "~/facebook-android-sdk/facebook" -参考“〜/ facebook-android-sdk / facebook”

after this the newly created project cannot compile because it has no manifest. 此后,新创建的项目由于没有清单而无法编译。 After copying it into this project manually, it doesn't even have the .java files and other resources. 手动将其复制到此项目后,它甚至没有.java文件和其他资源。

After copying all the stuff manually it now does work, but is there anything in the "normal" workflow according to the tutorial I did oversee? 手动复制所有内容后,它现在可以正常工作,但是根据我所监督的教程,“正常”工作流程中是否有任何内容? Or does anyone know why it does not work as intended using "Create project from existing source"? 还是有人知道为什么使用“从现有来源创建项目”无法正常工作?

Another easy way you can go with is to create the Jar file out of the facebook-sdk project you downloaded. 可以使用的另一种简便方法是从下载的facebook-sdk项目中创建Jar文件。 This can be done by exporting the facebook project as Jar from eclipse. 这可以通过将eclipse中的facebook项目导出为Jar来完成。

Then you can add this jar to your own project where you want to integrate facebook. 然后,您可以将此jar添加到您要集成Facebook的项目中。

This way your code will be clean and manageable too. 这样,您的代码也将很干净且易于管理。

您会看到文件/tests/default.properties facebook项目用作库。然后,我认为您了解所有过程。请按照以下说明进行操作:https://developers.facebook.com/docs/mobile/android/build/#sample

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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