Accepted answer

here's what i ended up doing:

  1. i created a new "dummy" project in android studio.

  2. in eclipse, i removed all references to the library projects from mylibraryproject, so they wouldn't get imported by android studio.

  3. in the dummy project i imported my library projects as modules (file->new->import module)

  4. i moved the folders containing my new modules from the project folder to my android studio projects root folder.

  5. in eclipse, i removed all references to mylibraryproject from my application projects (under project properties -> android), so it wouldn't get imported by android studio.

  6. i imported the eclipse application projects into android studio (using file->new->import project)

    i now had a folder structure that looked something like this:


android studio projects


  1. i edited the settings.gradle file in my application projects, like this:


include ':myapplicationproject1'

include ':mylibraryproject'
project(':mylibraryproject').projectdir = new file(settingsdir, '../mylibraryproject')

include ':mylibraryproject1'
project(':mylibraryproject1').projectdir = new file(settingsdir, '../mylibraryproject1')

include ':mylibraryproject2'
project(':mylibraryproject2').projectdir = new file(settingsdir, '../mylibraryproject2')

include ':mylibraryproject3'
project(':mylibraryproject3').projectdir = new file(settingsdir, '../mylibraryproject3')


  1. i edited the build.gradle file for mylibraryproject like this:


dependencies {
    compile project(':mylibraryproject1')
    compile project(':mylibraryproject2')
    compile project(':mylibraryproject3')


  1. i edited the build.gradle file for the module (not the project gradle file) myapplicationproject1 like this:


dependencies {
    compile project(':mylibraryproject')


as you can see, i've had to add all the libraries to the projects settings.gradle file. i tried creating a new settings.gradle file for mylibraryproject and including the other three library projects/modules there, but that didn't work. not a big deal though.

this setup seems to work like a charm, hopefully it helps someone else who struggles with this.

Related Query

More Query from same tag