Guilherme
Guilherme

Reputation: 7949

How to import a Module on Android Studio 0.5.1?

I've just updated Android Studio to 0.5.1 and I need to import Facebook SDK into my project.

Following Facebook's guide, I'm supposed to:

  1. Open the Project Structure dialog with Command + down arrow (on OS X)
  2. Select Modules under the left nav
  3. Click + and select Import Module

But when I click the + sign, it opens a window to create a new Module, rather than give me the options to create a new one or import a Module.

What is the proper way to import a Module?

Upvotes: 2

Views: 3796

Answers (1)

zied.hosni
zied.hosni

Reputation: 490

  1. create a folder "libs" under your root folder
  2. past the unziped facebook folder to "libs"
  3. with android studio go to libs/facebook/buid.gradle edit buildToolsVersion to "19.0.1" must be like app/buid.gradle
  4. Add this line include ':libs:facebook' to your settings.gradle
  5. in app/buid.gradle add compile project(':libs:facebook'); to dependencies like this
dependencies {
    compile 'com.android.support:appcompat-v7:+'
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile project(':libs:facebook'); }

7 on menu got to build , Make project

and that is ,try on your mainActivity import com. you will get an auto complete list with facebook

Upvotes: 4

Related Questions