加入Facebook的SDK来的IntelliJ Android项目? [英] Add facebook SDK to IntelliJ Android project?

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

问题描述

我如何添加Facebook SDK来我在的IntelliJ Android项目?我熟悉如何将库项目添加到现有的项目在Eclipse中,但不是在的IntelliJ。任何人都知道怎么样?

How can I add the facebook sdk to my android project in IntelliJ? I'm familiar with how to add a library project to an existing project in Eclipse, but not in IntelliJ. Anyone know how?

推荐答案

下面的答案是过时的,请参考实际的解决方案

The answer below is outdated, please refer to the actual solution.

如果它只是一个罐子,你可以添加该模块依赖

If it's just a jar, you can add it to the module dependencies.

如果你想使用的Andr​​oid库与源$ C ​​$ C,你需要创建一个新的模块IDEA与Android刻面并指定方面的设置,它的Andr​​oid库项目。配置模块内容和源根目录,然后添加该模块作为依赖于你的Andr​​oid应用程序模块。

If you want to use Android Library with source code, you need to create a new Module in IDEA with Android Facet and specify in the facet settings that it's Android Library Project. Configure module content and source roots and then add this module as a dependency to your Android application module.

下面是截图为理念的Facebook的Andr​​oid SDK模块配置:

Here are the screenshots for the Facebook SDK Android Module configuration in IDEA:

请注意,该模块的根从GitHub的库设置为的Facebook 子目录和是图书馆计划复选框被启用。

Note that the root of the module is set to the facebook subdirectory from the GitHub repository and Is Library Project checkbox is enabled.

如果您作为一个依赖这个功能,你的应用程序,一切都应该建立罚款。

If you add this module as a dependency to your application, everything should build fine.

我还上载了包括简单提供了SDK和这个的Facebook API模块作为依赖,你可以的下载并使用它作为参考

I've also uploaded a sample project that consists of simple sample provided with the SDK and this facebook API module as a dependency, you can download and use it for reference.

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

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