Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while trying to upload APK to Google Play

You uploaded an APK with an invalid signature (learn more about signing). Error from apksigner: ERROR (Jar signer CERT.RSA): JAR signature META-INF/CERT.SF indicates the APK is signed using APK Signature Scheme v2 but no such signature was found. Signature stripped?

Im doing this with Cordova, signed it and then aligned it, i dont really know what im missing here..

like image 796
Bruno Simoes Avatar asked Aug 11 '17 13:08

Bruno Simoes


3 Answers

Do alignment (if you really need it) before signing

https://developer.android.com/studio/publish/app-signing.html#signing-manually

like image 147
geiger Avatar answered Nov 09 '22 03:11

geiger


I was facing the same problem with my Cordova project and was able to resolve it by following the steps below: (took 2 days to figure out the solution :D hope it works for anyone who lands in here.)

  1. Import your project in AndroidStudio
  2. Under Build Click on Generate Signed Bundle / APK

enter image description here

  1. Select Android App Bundle

enter image description here

  1. Update Keystore file/password and all requested details (Please select the option of the export encrypted key, as you will require to upload this on the playstore)

enter image description here

  1. Select Release

enter image description here

  1. Before uploading the app bundle you need to upload the certificate (the one you download in step 4)

enter image description here

  1. (optional step) You will also see an auto-generated App signing key certificate you can download that if you want

  2. Upload the App Bundle & you can now release the App to PlayStore.

like image 40
Utpal - Ur Best Pal Avatar answered Nov 09 '22 03:11

Utpal - Ur Best Pal


I've just found that error with multiple APKs from different projects. What they had in common (from a user's perspective) was they were compiled in the same narrow time frame (within a few weeks, and about a year ago).

I've contacted the resp. developers via their corresponding Github repo. In all cases, the issue solved itself by compiling the very same code again with an updated version of Android Studio.

So if it's not the "processing order" explicitly performed by you (yes, with v2 signing must be the very last step or the signature will be broken), it might well be there was a bug in a specific version of Android Studio and, as shown, updating to the recent version and simply recompiling will solve the issue.

like image 25
Izzy Avatar answered Nov 09 '22 01:11

Izzy