Android Studio cannot find AAR packages
11,289
Looks like you could do this How to manually include external aar package using new Gradle Android Build System
If you have them in your lib folder
repositories {
flatDir {
dirs 'libs'
}
}
dependencies {
compile(name:'UpPlatformSdk', ext:'aar')
}
Comments
-
Marcus Gabilheri almost 2 years
I am having a problem with Android Studio recognizing classes inside an @aar library imported locally.
So... I've made a library and exported is an aar file. Inside android studio I selected
Import Module
and themImport .JAR or .AAR Package
.The project compiles and works with the classes inside the aar file but Android studio can not find the classes or offer any auto completion of so all.
Here is a few of screenshots:
The same problem also happens with other @aar libraries imported the same way:
Any suggestions?
Edit:
build.gradle:
... dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile project(':UpPlatformSdk') compile project(':simpleorm') ... // more libraries here }
settings.gradle:
include ':app', ':UpPlatformSdk', ':wear', ':simpleorm'