Android Studio – Creating Modules without copying files?

Yes, you can do it. The module needs to have a Gradle build file set up for it. If it’s got that, then in the project you’re linking to it, add this to the settings.gradle file at the project root:

include ':libraryName'
project(':libraryName').projectDir=new File('/path/to/library')

where the path you specify in the second line is the path to the directory containing the library’s build.gradle file. The path can be relative or absolute.

Leave a Comment