Last Updated : 23 Jul, 2025
Android Studio can be used to create an Android archive file (*.aar) that can contain classes and methods that make use of Android classes and related files. Like creating the Jar file, an Android project must be created first, then the Android library module can be created and added. The main difference between a Jar and an AAR is that AAR s include resources such as layouts, drawables, etc. . For example if you have multiple apps that use the same login screen, with Jar's you could share classes but not the layout, styles, etc., you still had to duplicate them. So in this article, we are going to see what are .aar files, how to open them in Android Studio, and five different ways to create .aar files in Android Studio.
What is the .aar file in Android Studio?An Android library is structurally the same as an Android app module. It can include everything needed to build an app, including source code, resource files, and an Android manifest. However, instead of compiling into an APK that runs on a device, an Android library compiles into an Android Archive (AAR) file that you can use as a dependency for an Android app module. AAR files offer the following functionality for Android applications:
In addition to JAR files, Android uses a binary distribution format called Android Archive(AAR). The .aar bundle is the binary distribution of an Android Library Project. An AAR is similar to a JAR file, but it can contain resources as well as compiled byte-code. AAR files can contain Android resources and a manifest file, which allows you to bundle in shared resources like layouts and drawables in addition to Java classes and methods.
How to open .aar files in Android Studio?Step 1: Creating AAR
If you have already created AAR then you can skip this step and jump to generate AAR. If you haven't created AAR then follow these steps: Navigate to File > New > New Module.
Then select "Android Library" from the options and click the next button.
Step 2: Generate AAR
Go to Gradle at the top-right pane in android studio follow the below steps. Gradle > Drop down library name > tasks > build > assemble or assemble release
AAR will be generated in build/outputs/aar/
.aar files Method 2If you have set-up your library as an Android library that is if you have done with then follow the below steps:
You can create a new Android Library using File > New Module and selecting the "Android Library" type as already shown in Method 1.
Method 3If you cannot find .aar files under build/outputs/aar/ directory then type this command in terminal:
gradlew assemble
and after hitting ENTER button you should see the "Build Successful" message on the screen.
Method 4Try to simply Build > Rebuild project. AAR file should appear in ~/Source/build/outputs/aar
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4