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

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


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"


This issue of can already be handled with the answers like execute

./gradlew assembleRelease

or choose assembleRelease from Android Studio's Gradle menu. However, for completeness, with Android Studio 1.5.1 (and probably also older versions) building release version of a .aar can be accomplished by selecting Build->"Build APK" in Android Studio. It seems to execute assembleRelease. If your project only contains the library project, it does not ask for any signing information.


I faced this issue in AS 2.3.3 and solved it by changing the build variant of the module to release and building it again:

enter image description here