0
votes

I built an apk app with developer mode for my client using cordova build android. I did not publish to play store. I guess the cordova build automatically generate key store for me.

Unfortunately, I have formatted my Mac and now I need to update my apk app. It always shows the message like "ERROR: Failed to launch application on device: ERROR: Failed to install apk to device: pkg: /data/local/tmp/MainActivity-debug.apk Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]" when I try 'cordova run android --device'.

I need to update the app since there is important data inside the app. Any solution to build this app without generate the keystore and overwrite the old app.

1

1 Answers

0
votes

Application should be signed with the same key to update the application.

Your application in development mode is always signed by default with debug.keystore placed on your computer at following place:

~/.android/ on OS X and Linux

C:\Documents and Settings\.android\ on Windows XP

C:\Users\.android\ on Windows Vista and Windows 7, 8, and 10

If you have formatted your computer then I am afraid you have lost the key and can't sign your application again with the same debug.keystore and restart the application.