How to import a module on Android Studio 0.5.1?

I just upgraded Android Studio to 0.5.1, and I need to import the Facebook SDK into my project.

Following the Facebook guide , I should:

  • Open the Project Structure dialog box with the Command + down arrow (in OS X).
  • Select the modules under the left navigation.
  • Press + and select "Import Module"

But when I click the + sign, it opens a window for creating a new module, instead of giving me options for creating a new one or importing a module.

What is the correct way to import a module?

+2
android studio
source share
1 answer
  • create the "libs" folder in your root folder
  • past the unzipped facebook folder to the "libs" folder
  • with android studio go to libs / facebook / buid.gradle edit buildToolsVersion in "19.0.1" should look like app / buid.gradle
  • Add this line include ':libs:facebook' to your .gradle settings
  • in app / buid.gradle add compile project(':libs:facebook'); to such dependencies
 dependencies { compile 'com.android.support:appcompat-v7:+' compile fileTree(dir: 'libs', include: ['*.jar']) compile project(':libs:facebook'); } 

7 in the menu that you want to create, Make a project

etc., try your mainActivity import com. you will get auto complete list with facebook

+4
source share

All Articles