将 facebook SDK 添加到 IntelliJ Android 项目? [英] Add facebook SDK to IntelliJ Android project?
问题描述
如何在 IntelliJ 中将 facebook sdk 添加到我的 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.
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.
Here are the screenshots for the Facebook SDK Android Module configuration in IDEA:
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.
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屋!