All of the answers in similar questions talk about manunally editting gradle files. But I\'ve used Android Studio to import the AAR file and checked the build.gradle files a
You need to specify the location of "ShowCaseView-5.0.0.aar" in project's build.gradle file. E.G, the ShowCaseView-5.0.0.aar file is in a folder named "libs" under project's root directory, update you build.gradle file to add following
allprojects {
repositories {
flatDir {
dirs 'libs'
}
}
}
Recently, I encountered this very same issue. I had an AAR to import into my project. The library was distributed only as AAR. I resolved it by putting my AAR file inside libs/
folder and added the following line in my app module's gradle:
dependencies {
...
compile files('libs/theFirstLib.aar')
}
You can also add multiple AARs like so:
dependencies {
...
compile files('libs/theFirstLib.aar', 'libs/theSecondLib.aar')
}
If you are using Gradle 3.0.0 or higher, you may need to substitue compile
with implementation
:
implementation files('libs/theFirstLib.aar')
Worked like a charm!
NOTE: Importing an AAR sometimes results to another "cannot resolve symbol" error, which I resolved here when Android Studio and Gradle don't agree.