Android invalid signature

I had built an app using phone gap which has been live the the iOS app store, and the Android play store since the start of the year. For version 2 I’ve rebuilt the app using ionic.

iOS accepted the new build without issue, but Android is not allowing me upload the new apk.

The Apk was signed with the same keystore, and has the same package name, but I am getting an ‘invalid signature error’. Here is a screen shot.

The commands I’m running to sign the apk are:

  1. jarsigner -keystore keystore-name.keystore android-release-unsigned.apk alias-name

  2. jarsigner -verify -keystore keystore-name.keystore android-release-unsigned.apk

  3. ~/Library/Android/sdk/build-tools/25.0.2/zipalign -v 4 android-release-unsigned.apk jct.apk

My environment:
Cordova CLI: 6.5.0
Ionic CLI Version: 2.2.2
Ionic App Lib Version: 2.1.7
ios-deploy version: 1.9.1
ios-sim version: 5.0.13
OS: macOS Sierra
Node Version: v4.4.4
Xcode version: Xcode 9.0 Build version 9A235

A solution or anything to point me in the right direction would be greatly appreciated

Try this command for signing:

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore
my_application.apk alias_name

I am having a similar issue with facebook authentication… it keep gettig invalid hash key even though i used the base64 command for signature can any one help me out

Hi, @rebelxyy789

Follow this tutorial and on generate key hash do not give any password just press enter,