Skip to content Skip to sidebar Skip to footer

Sign Android Apk With A Certificate That Expires Further In To The Future

I have built an android app using phonegap build. I am now trying to get this on the play store but keep getting the following error You uploaded an APK signed with a certificate t

Solution 1:

Set expiration to be greater than 50 years.

-validity 20000

Solution 2:

Important Note: Don't attempt to use a purchased code signing Certificate!

If you come from the Windows app/application development world it is natural to assume that you want to use a purchased code signing certificate.

That is possible but when you or your client attempts to submit the application to the Google play store it will fail with the 'APK signed with a certificate that expires too soon' error. That is because the max validity of most purchased certificates is around 2/3 years.

The solution is to just generate your own certificate as explained by others. I picked a validity of 100 years and it worked just fine. I am pretty sure I won't be working on this app in 100 years.

The disconnect is because the certificates are used in a different way and for a different purpose. Rather then identifying and naming the developer, the self generated certificate is used to ensure that two application versions came from the same but unnamed source.

The full details can be found in: https://developer.android.com/studio/publish/app-signing.html

Solution 3:

try to use that: keytool.exe -genkey -v -keystore release.keystore -alias TicTacToe -keyalg RSA -keysize 2048 -validity 20000

Solution 4:

If you work with Flash Builder and you are getting this message when uploading to the Play Store, make sure you upload an .apk generated by going to Project > Export Release Build... instead of a normal .apk generated by a run of your project.

I had generated a correct certificate but I still got the same error message until I did this. Just in case somebody has the same problem...

Post a Comment for "Sign Android Apk With A Certificate That Expires Further In To The Future"