Create aar file using android studio
Channel: Serial Coder
Date: 2022-03-17

Just 10 steps to create .aar file

1. Create project
2. Open project build.gradle
3. Replace plugin with this 
plugins {
    id 'com.android.application'
}
with 
plugins {
    id 'com.android.library'
}

4. Remove applicationId from defaultConfig
defaultConfig {
    minSdk 21
    targetSdk 32
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

5. Sync now
6. Go to Build on toolbar
7. Go to Build - Make Application.app 
8. Once gradle sync done aar file is created on output folder
9. Go to project folder and open app - Build - output - aar - apk-debug.aar
10. Now .aar file has been created and we can use on our project