Exporting to APK
Last updated
Last updated
Building a standard debug APK is fairly trivial, since your system is essentially doing that anyway every time you hit the Run button.
Through the menu, go to Build > Build Bundle(s) / APK(s) > Build APK(s) to create a simple debug apk file. A small prompt will pop up with the link to locate this file, however it's typically created at [Project Root]/app/build/outputs/apk/debug.
This can then be installed on any Android device manually, given several restrictions. You'll find that Android will warn you half a dozen times about "Installing from unknown sources", an option that you may need to enable in developer settings. Then you'll have to tell Google Play Protect to not quarantine the app immediately for being an unknown variable. It's only after fighting the immune system of your phone for a minute or two that it will finally let you install unverified code.
An APK for Google to distribute requires a signature, a digital marker that identifies it through the private secure key that created it. This process is a bit more involved, and creates some very important files you dare not lose.
Through the menu once more, go to Build > Generate Signed Bundle / APK to enter a setup assistant for this process. It will lead you through creating the keys, assigning passwords, and the exact type of file you'd like to create. For more information about this process, visit Google's documentation on publishing your app.