How to create a release android library package (aar) in Android Studio (not debug)

Ralph picture Ralph · Dec 25, 2014 · Viewed 67k times · Source

I have built my android library package (aar) and the result of build is created in "..\app\build\outputs\aar" folder. The file within this folder is called "app-debug.aar" so I guess it has been built in debug mode so I would like to know how to genereate the release built, that is, "app-release.aar". How can I do this? Also, is it possible to genereate the build with another custom name, for example, "myCustomAppName-release.aar" instead of "app-release.aar".

Answer

jiminikiz picture jiminikiz · Jul 8, 2015

In Android Studio 1.2+, there is a complete gradle menu that lists all of the available gradle tasks.

I found this menu on the right side of the IDE with default options enabled.

The gradle menu is on the right side of the IDE by default...

Right click the task you want and click "Run".

Right click the task you want a click "RUN"