Sign the Android APK with a certificate that expires in the future

I created an Android application using the phonegap assembly. Now I'm trying to get this in the play store, but keep getting the following error.

You uploaded an APK signed with a certificate that expires too soon. You need to sign your APK with a certificate that expires farther into the future 

I created a signature key with java jdk1.8.0 keytool and I used this code

 keytool.exe -genkey -v -keystore release.keystore -alias TicTacToe -keyalg RSA -keysize 2048 -validity 10000 

I do not understand. As far as I can tell, I set a date in 10,000 days, which should be a lot?

+6
source share
4 answers

Establish a validity period of more than 50 years.

 -validity 20000 
+7
source

Important Note. Do not attempt to use the purchased code signing certificate.

If you come from the world of developing applications and Windows applications, it is natural to assume that you want to use the acquired code signing certificate.

This is possible, but when you or your client try to send the application to the Google Play store, it will fail if "the APK is signed with a certificate that expires too soon ." This is due to the fact that the maximum validity of most acquired certificates is about 2/3 years.

The solution is to simply create your own certificate, as others explain. I chose a shelf life of 100 years and everything went fine. I am sure that I will not work on this application after 100 years.

Disabling occurs because certificates are used differently for a different purpose. Instead of identifying and naming the developer, the generated certificate itself is used to ensure that two versions of the applications are obtained from the same, but unnamed source.

Full details can be found at: https://developer.android.com/studio/publish/app-signing.html

+3
source

try using this:
keytool.exe -genkey -v -keystore release.keystore -alias TicTacToe -keyalg RSA -keysize 2048 -validity 20,000

+2
source

If you are working with Flash Builder and receive this message when downloading to the Play Store, make sure that you download the .apk generated by going to Project> Export Release Build ... instead of the regular .apk generated by starting your project.

I created the correct certificate, but so far I have received the same error message. Just in case, someone has the same problem ...

0
source

All Articles