I have an Android application made up of multiple projects. One of those projects is an App project that just extends the Application object.
Inside the build.gradle for that app project, I add other projects as dependencies.
I've just created a new module to house an SDK (aar) I want to use. I've also added it to my app project's build.gradle.
compile project(':newmodule-thesdk')
Inside the libs folder of newmodule-thesdk, I have added the aar file. We'll call it thesdk.aar.
repositories {
flatDir {
dirs 'libs'
}
}
dependencies {
compile(name:'thesdk-1.0', ext:'aar')
}
When I attempt to sync gradle, the sync fails because thesdk-1.0 does not exist in the libs folder of my app project. Why is it looking for it there? Why is it not just finding it in the newmodule-thesdk project?
It appears solving the problem required me to do the following in my App project's build.gradle.
repositories {
flatDir {
dirs project(':newmodule-thesdk').file('libs')
}
}
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