3

I was trying to import external Library to my android project in android studio many answers here say it can be done from module in project structure in settings.But since the 0.2.8 update there is no library, module in project structure. how do i import external Library now?

maybe this is a bug in 0.2.8 update. not sure

null pointer
  • 5,874
  • 4
  • 36
  • 66

2 Answers2

5

Step 1: Select Project > Right Click > Open Module Settings (F12) > Projects Settings > Click Modules.

Step 2: Click your Project > you will see 3 tabs : Sources/Path/Dependencies. Step 3 : Select Dependencies tab. You will see green '+' button to the right of 'Scope' title. Click on this and it will allow you to add Jars and libs.

PS: make the scope of the added jars/libs as Compile

Prachi
  • 3,584
  • 2
  • 24
  • 39
  • Projects Settings is no longer there. only platform settings is there. Sources/Path/Dependencies is there in platform settings. – null pointer Sep 12 '13 at 09:55
  • I was having the same problem, where Project Settings was not showing up when I opened it using File->Project Structure, but this solution worked for me in Android Studio 0.2.10 – Cypress Frankenfeld Sep 26 '13 at 00:42
0

You can set external module in this way

In global setting.gradle file add this line

def projectDialogsDir = file('path_of_the_module')
def rootProjectDescriptor = settings.rootProject
settings.createProjectDescriptor(rootProjectDescriptor, 'yourModule', projectDialogsDir)
include(':yourModule')

Then in the build.gradle files of your app's module, you have just to add, under dependencies

dependencies {
  compile project(':yourModule')
}
Stefano
  • 3,127
  • 2
  • 27
  • 33