When you are building an Android App you finally want to publish it in the Google Play Store.
To achieve this you need to build an signed app bundle in Android Studio first
Select build variant “release”
Go to Build -> Select Build Variant
Now a new tool window becomes visible. Select “release” from Active Build Variant drop down menu.
Generate Signed Bundle
Go to Build -> Generate Signed Bundle / APK
Select Android App Bundle
Set keystore credentials
After the gradle build finished you can find the signed bundel under app/release/app-release.aab