My project contains one main module ('app') and one library module ('mylibrary'). In my library I have a libs folder, which contains an aar file to a library that I want to use in my 'library' module. I'm referencing my aar library using the following gradle script:
repositories{
flatDir{
dirs 'libs'
}
}
dependencies{
compile(name:'nameOfAar', ext:'aar')
}
This doesn't help it's trying to look in the mavenCentral for the aar library, but doesn't want to look in the flat directory that I've specified. Does anybody got any clue, how can I reference an aar library from an library module?
I had the same problem but unfortunately the only solution that I found is to add '../<library_dir>/libs' to build.gradle of the app
repositories {
flatDir {
dirs 'libs', '../<library_dir>/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