Create aar file in Android Studio

AndroidEnthusiast picture AndroidEnthusiast · Jun 19, 2014 · Viewed 138.9k times · Source

I'd like to create an aar file for my library in Android Studio, i would've gone with a jar option but my library has resources.

Any idea how to create an aar file from a library?

Answer

Scott Barta picture Scott Barta · Jun 19, 2014

If your library is set up as an Android library (i.e. it uses the apply plugin: 'com.android.library' statement in its build.gradle file), it will output an .aar when it's built. It will show up in the build/outputs/aar/ directory in your module's directory.

You can choose the "Android Library" type in File > New Module to create a new Android Library.