Hi, Can i use .aar with the help of Kotlin DSL? I ...
# android
n
Hi, Can i use .aar with the help of Kotlin DSL? I am attaching project structure snap. I am using below code to access it but getting error.
Copy code
implementation("$rootDir/UI-Modules/carousel-release.aar"
m
That does not work. Here’s a link to a thread I responded to earlier that included how to do it. https://kotlinlang.slack.com/archives/C3PQML5NU/p1663688167990759
l
You need
implementation(files("/path/to/aar"))
m
That will work if you are only accessing the library from an app project and not a library project.
n
THanks 🙂
m
@Nipun Rajput i think is related to how gradle handles the dependency, if youre using local aar, try to put inside some common folder for that, using android studio wizard for that worked. https://stackoverflow.com/questions/67724242/how-to-import-aar-module-on-android-studio-4-2
n
Thank You 🙂