How to update apk ionic


#1

Hello,
I have my apk here:
/Users/angelo/i/platforms/android/build/outputs/apk/AssociaizoneCata.apk
I made some changes to the app … now how do I update?


#2

Ionic build android?


#3

I have to delete the folder / Android

and then:
cordova build --release android?


#4

You don’t have to delete the folder.
In platforms/android/cordova run “clean.bat” file that will delete the old .apk file.
Then yes: cordova run android --release
or what i would do is: ionic run android --prod --release


#5

By following your comments,

I’ll get an unsigned apk file

Can i need to generate a new key again and again for ever update?


#6

you never should generate a key again. In fact, you should only generate a key once per project and then especially don’t loose it! Once you’ve uploaded an APK into production, you need the exact same .keystore file to upload a new binary. If you’ve build the APK with the --release flag, you should then sign it with the key and zipalign it.


#7

Thanks luukschoen

I understood but i didn’t know how to sign it with the same key and zipalign

Would you please detail this.

Thanks.


#8

You perform the exact same procedures, but now on your newly generated unsigned apk. If you’ve done the steps once, you could do it twice. The ionic 1 publishing docs are actually still valid.

http://ionicframework.com/docs/v1/guide/publishing.html


#9

Thanks luukschoen.

I got it , i just run two commands jarsigner and zipalign