Including Entire Project As Library Android Studio
Solution 1:
You can only have one settings.gradle file per project, so if you have a multi-module library with its own settings.gradle, you can't bring it in with a single include
statement. You'll need to merge the library's settings.gradle into that of the project you're including it in.
When you do the merge, make sure that all the include
statements in the merged settings.gradle have sensible paths that will locate their libraries relative to the project root. Also keep in mind that the paths specified in your settings.gradle file have to match what's in your dependencies
block. So if you have this:
include':app'include':app:libraries:Overt:Visible'include':app:libraries:Overt:Control'
You need this:
dependencies {
compile'com.android.support:appcompat-v7:19.+'compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':app:libraries:Overt:Visible')
compile project(':app:libraries:Overt:Control')
}
In the build script you posted in your question, there's a typo: it says complie
instead of compile
. If that's a typo in your build script and not just a typo in your question here, that will be a problem.
Post a Comment for "Including Entire Project As Library Android Studio"