https://kotlinlang.org logo
n

Nipun Rajput

09/22/2022, 9:26 AM
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

mkrussel

09/22/2022, 12:15 PM
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

Landry Norris

09/22/2022, 12:55 PM
You need
implementation(files("/path/to/aar"))
m

mkrussel

09/22/2022, 1:03 PM
That will work if you are only accessing the library from an app project and not a library project.
n

Nipun Rajput

09/22/2022, 1:07 PM
THanks 🙂
m

marlonlom

09/22/2022, 8:12 PM
@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

Nipun Rajput

09/26/2022, 4:29 AM
Thank You 🙂
30 Views