Add facebook SDK to IntelliJ Android project?

How can I add facebook sdk to my Android project in IntelliJ? I am familiar with how to add a library project to an existing project in Eclipse, but not in IntelliJ. Does anyone know how?

+8
android intellij-idea facebook
source share
2 answers

The answer below is deprecated, refer to the actual solution .


If it's just a can, you can add it depending on the module .

If you want to use the Android library with source code, you need to create a new module in IDEA with Android Facet and specify in the facet settings which it represents the Android Library Project. Customize the contents of the module and the source roots, and then add this module depending on your Android application module.

Here are the screenshots for configuring the Android Android Android SDK in IDEA:

sourceslibrary projectproject view

Please note that the facebook subdirectory from the GitHub repository is installed in the root module and the Is Library Project checkbox is checked.

If you add this module depending on your application, everything should be built perfectly.

I also downloaded a sample project consisting of a simple sample provided using the SDK and this facebook API as a dependency, you can download and use it for reference .

+13
source share

Delete if not suitable, but this solution was much more relevant for the latest IDEA and the latest version of the SDK for Facebook:

Tested with IDEA 12.1.2 and Facebook SDK 3.0.1

My reason for posting this question is because the directory structure for the latest Facebook SDK is different and makes this post obsolete. I also continued to address this topic, while the thread I'm connected to is a better and more relevant solution.

+4
source share

All Articles