Skip to content

Instantly share code, notes, and snippets.

@mauriciopazpp
Created November 5, 2018 16:15
Show Gist options
  • Save mauriciopazpp/983f68d27e923230c3a599881e1787df to your computer and use it in GitHub Desktop.
Save mauriciopazpp/983f68d27e923230c3a599881e1787df to your computer and use it in GitHub Desktop.
Publish cordova app on Play Store

generate keytools file

keytool -genkey -v -keystore mnjic.keystore -alias mnjic -keyalg RSA -keysize 2048 -validity 10000

Sign app

cordova run android --release -- --keystore=mnjic.keystore --storePassword=abcd --alias=mnjic --password=abcd

this command above will generate same entries as below mentioned in build.json

review build.json { "android": { "debug": { "keystore": "../android.keystore", "storePassword": "android", "alias": "mykey1", "password" : "password", "keystoreType": "" }, "release": { "keystore": "../android.keystore", "storePassword": "", "alias": "mykey2", "password" : "password", "keystoreType": "" } } }

$ cordova build // this command will build a signed apk file $ cordova build --release // this command will build final apk // build with release flag will generate a final app file which can be submitted to Google Play Store.

/Users/amitshukla/documents/mnjic1/platforms/android/app/build/outputs/apk/debug/app-release.apk

Prepare Google PlayStore Screnshoot

Publish to Google Play Store

** In case, if you are releasing an updated release on your app.

Do NOT forget to change version code on next time your build your app (--release).

© 2018

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