Skip to content

Instantly share code, notes, and snippets.

@Prasanth-Shakti
Last active September 3, 2022 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Prasanth-Shakti/36d8970da6c0b87c24df99f1ed60ad7e to your computer and use it in GitHub Desktop.
Save Prasanth-Shakti/36d8970da6c0b87c24df99f1ed60ad7e to your computer and use it in GitHub Desktop.
Generating Android Release apk

Generating Android Release apk.

keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

Set a store password: XXXX

what is your first and last name?
[Unknown]: XXX
What is the name of your organizational unit?
[Unknown]: XXXX
What is the name of your organization?
[Unknown]: XXXX
What is the name of your City or Locality?\ [Unknown]:
What is the name of your State or Province?
[Unknown]:
What is the two-letter country code for this unit?
[Unknown]:

android > app > build.gradle

  signingConfigs {
       debug {
           storeFile file('my-release-key.keystore')
           storePassword 'XXXX'
           keyAlias 'alias_name'
           keyPassword 'XXXX'  -----------> same as storepassword
       }
   }

Place the file my-release-key.keystore in the same place as app > build.gradle

[change to poweshell in windows] Cd android ./gradlew assembleDebug -----> it will generate the apk in android > app > build >outputs > apk|debug

Reference: https://stackoverflow.com/questions/3997748/how-can-i-create-a-keystore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment