Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 326
Bungles Avatar asked Dec 08 '15 23:12

Bungles


People also ask

How do I add an AAR file?

Add your AAR or JAR as a dependencyNavigate to File > Project Structure > Dependencies. In the Declared Dependencies tab, click and select Jar Dependency in the dropdown. In the Add Jar/Aar Dependency dialog, first enter the path to your . aar or .

What is .AAR file in Android Studio?

An AAR file contains a software library used for developing Android apps. It is structurally similar to an . APK file (Android Package), but it allows a developer to store a reusable component that can be used across multiple different apps.

How do I unpack an .AAR file?

In android studio, open the Project Files view. Find the . aar file and double click, choose "arhcive" from the 'open with' list that pops up. This will open a window in android studio with all the files, including the classes, manifest, etc.


1 Answers

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

enter image description here

like image 61
Anirban Avatar answered Sep 21 '22 09:09

Anirban