Bungles
Bungles

Reputation: 2257

Why won't Android Studio create my AAR file in release mode

Using Android Studio, I have an Android library project which produces 'library/build/outputs/aar/MyLIB.aar" just fine in Debug mode, but does not do so in Release mode. I see no errors, just "BUILD SUCCESSFUL" in the "Gradle Console" window but no Release Mode artifact.

There was a similar question raised here, and I'm getting the same behavior as #user1624552 mentions in the link:

"gradlew clean" followed by "gradlew aR" resultd in my AAR being created and correctly placed in the directory above. But using Android Studio and the "Release Mode" Build Variant does NOT create an AAR file.

Is there something configured in the Debug variant which is not configured in the Release variant?

Thanks, ALF

Upvotes: 7

Views: 4186

Answers (2)

A J
A J

Reputation: 4652

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

enter image description here

Upvotes: 4

Abdalla
Abdalla

Reputation: 2073

To get the aar, you can do the following

  1. View/Tool Windows/Gradle”, to open the gradle window

  2. From gradle window, run assembly Gradle task by double-click on My_Plugin_Android/:My_Plugin/Tasks/build/assemble

Upvotes: 4

Related Questions