I am trying to build a project with the following structure. It is an app that uses a library project using another library (Google Volley).
- MainProject
|-- ModuleProject
|-- SubmoduleProject
ModuleProject/build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
}
}
apply plugin: 'android-library'
dependencies {
compile project(':SubmoduleProject')
}
ModuleProject/settings.gradle
include ':SubmoduleProject'
Android studio throws the following error:
Project with path ':SubmoduleProject' could not be found in project ':ModuleProject'
How can I build my project with nested libraries?
Your MainProject/settings.gradle should have
include 'ModuleProject', 'ModuleProject:SubmoduleProject'
and the dependency will be compile project(':ModuleProject:SubmoduleProject')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With