I was getting the same errors.
This was the only thing that helped me:
dependencies {
compile(name:'nameOfYourAARFileWithoutExtension', ext:'aar')
}
repositories{
flatDir{
dirs 'libs'
}
}
Reference: Adding local .aar files to Gradle build using “flatDirs” is not working