Skip to content
Advertisement

How can I add a linked source folder in Android Studio?

In Eclipse I can add a source folder to my Android project as a “linked source folder”. How do I achieve the same thing in Android Studio?

Or is it possible to add an external folder to build in Gradle?

Advertisement

Answer

In your build.gradle file, add the following to the end of the Android node:

android {
    ....
    ....

    sourceSets {
        main.java.srcDirs += 'src/main/<YOUR DIRECTORY>'
    }

}
Advertisement