The Godot Android Build Environment is a companion app for the Godot XR Editor that provides a build environment to perform Gradle builds when running natively on an XR device.
The app is is completely free and open-source:
https://github.com/godotengine/android-editor-buildenv-app