How to create an apk-file for downloading to other devices from the project in Android Studio?

    1 answer 1

    At least there are two ways:

    1. Manually

    In the Android Studio menu, choose Build - Generate Signed APK .

    Next, create a keystor and the key itself, which will be signed by the application.

    In the next step, choose Build type - release , Finish . Next, by clicking Show in Explorer , the directory with the APK opens.

    2. With gradlew assembleRelease

    In build.gradle configure the release configuration:

     android { ... defaultConfig { ... } signingConfigs { release { storeFile file("my-release-key.jks") storePassword "password" keyAlias "my-alias" keyPassword "password" } } buildTypes { release { signingConfig signingConfigs.release ... } } } 

    Next, from the root directory of the project, perform gradlew assembleRelease .

    If memory serves, the default APK will be %APP_DIR%\app\build\outputs\apk .

    More information can be found in the official documentation .