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

Hey guys

I’m getting this error when i tried to upload my app on play store 

You uploaded an APK that was signed in debug mode. You need to sign your APK in release mode

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.

Please help

You need a release keystore. Corona provides a debug keystore that you can use to test your apps on your device, but before you release to the store, you have to use a keystore that’s unique to you.

A keystore is a file that holds multiple key aliases (or it can hold one key alias). You use a program that comes with Java’s JDK called “keytool” to create this keystore. The process is describe here:

https://docs.coronalabs.com/guide/distribution/androidBuild/index.html

If you’re on a Mac. If you’re on Windows, these instructions are different because you have to know where keytool.exe is installed (and it varies depending on the version of the Java JDK you have installed. You’re best bet is to find a tutorial via a Google search to make that keystore file.

Once you have the keystore file and key alias defined and stored some place you won’t loose it, you can then tell the Corona SDK build dialog where to find the keystore, pick the alias from it, put in the passwords and then you can build a version of the APK that you can upload to Google Play.

Rob

It give me this error while creating a keystore using cmd

Solved !

I opened cmd as administrator 

Since I can’t see the command you typed in, there is a good chance, since  you need to be an Administrator that you put the keystore file in the same folder as the keytool.exe program. This will be very dangerous. If you ever update your JDK, that folder will be removed and you will loose your keystore. You need to save the keystore somewhere in your personal storage area like C:\Users\yourname\Documents\ or somewhere that you will remember it. Once you submit an app to Google Play using a keystore, you have to use that keystore forever. If you loose it, you have to create a new store entry and your app will show up as a new app, which isn’t good.

Rob

Oh god! Thanks man :slight_smile:

This part has always frightened me to death. One time after releasing my game to moderate success, my mac mini crashed!  I didn’t think much about it because the corona game was backed up… I got a new mac mini and kept working on an update. When my update was finished, I was trying to update using debug keystore and someone on the Corona IRC informed me about using that old Keystore file!  I couldn’t find it (it wasn’t in the back up)

I took the old (broken) mac mini down to the apple store, and luckily they were able to find ‘myGames.keystore’ on the broken mac mini in the Documents directory! I was able to get them to pull it from that mac mini and put it on a usb thumb drive. Then came the problem of remembering the passwords!  So I had it written down in a mountain of scraps of paper! However, I was able to determine the password (from the notes) and do an update. (phew! that caused some grey hairs to sprout on my head.)

So now I have that myGames.keystore file backed up and the passwords physically written on multiple secure spiral notebooks. :smiley:

So I am about to release another game. So can use the same myGames.keystore file to create a new key? right?  The old one was

myGames.keystore

[password]

com.lavalevel.[myFirstGameID]

[password]

I remember I created the myGames.keystore file in Terminal with the help of some people on the Corona irc channel. So for the sequel I can use the same myGames.keystore file, but modified, to have a 

com.lavalevel.[mySecondGameID]

[password]

?

If anyone knows terminal commands, and there is a way to update that myGames.keystore file I created, is there a way to just browse the current one? Maybe get familiar with it before I create that final signature? 

See “Signing for Release Build”

https://docs.coronalabs.com/guide/distribution/androidBuild/index.html

on a Mac, it’s pretty much copy/paste as long as you change out the filename for the keystore and provide your new alias. It helps to have done a “cd” (Change Directory) command to the folder where the keystore file exists to avoid having to type the path to the keystore file name in the keytool command.

Rob

You need a release keystore. Corona provides a debug keystore that you can use to test your apps on your device, but before you release to the store, you have to use a keystore that’s unique to you.

A keystore is a file that holds multiple key aliases (or it can hold one key alias). You use a program that comes with Java’s JDK called “keytool” to create this keystore. The process is describe here:

https://docs.coronalabs.com/guide/distribution/androidBuild/index.html

If you’re on a Mac. If you’re on Windows, these instructions are different because you have to know where keytool.exe is installed (and it varies depending on the version of the Java JDK you have installed. You’re best bet is to find a tutorial via a Google search to make that keystore file.

Once you have the keystore file and key alias defined and stored some place you won’t loose it, you can then tell the Corona SDK build dialog where to find the keystore, pick the alias from it, put in the passwords and then you can build a version of the APK that you can upload to Google Play.

Rob

It give me this error while creating a keystore using cmd

Solved !

I opened cmd as administrator 

Since I can’t see the command you typed in, there is a good chance, since  you need to be an Administrator that you put the keystore file in the same folder as the keytool.exe program. This will be very dangerous. If you ever update your JDK, that folder will be removed and you will loose your keystore. You need to save the keystore somewhere in your personal storage area like C:\Users\yourname\Documents\ or somewhere that you will remember it. Once you submit an app to Google Play using a keystore, you have to use that keystore forever. If you loose it, you have to create a new store entry and your app will show up as a new app, which isn’t good.

Rob

Oh god! Thanks man :slight_smile:

This part has always frightened me to death. One time after releasing my game to moderate success, my mac mini crashed!  I didn’t think much about it because the corona game was backed up… I got a new mac mini and kept working on an update. When my update was finished, I was trying to update using debug keystore and someone on the Corona IRC informed me about using that old Keystore file!  I couldn’t find it (it wasn’t in the back up)

I took the old (broken) mac mini down to the apple store, and luckily they were able to find ‘myGames.keystore’ on the broken mac mini in the Documents directory! I was able to get them to pull it from that mac mini and put it on a usb thumb drive. Then came the problem of remembering the passwords!  So I had it written down in a mountain of scraps of paper! However, I was able to determine the password (from the notes) and do an update. (phew! that caused some grey hairs to sprout on my head.)

So now I have that myGames.keystore file backed up and the passwords physically written on multiple secure spiral notebooks. :smiley:

So I am about to release another game. So can use the same myGames.keystore file to create a new key? right?  The old one was

myGames.keystore

[password]

com.lavalevel.[myFirstGameID]

[password]

I remember I created the myGames.keystore file in Terminal with the help of some people on the Corona irc channel. So for the sequel I can use the same myGames.keystore file, but modified, to have a 

com.lavalevel.[mySecondGameID]

[password]

?

If anyone knows terminal commands, and there is a way to update that myGames.keystore file I created, is there a way to just browse the current one? Maybe get familiar with it before I create that final signature? 

See “Signing for Release Build”

https://docs.coronalabs.com/guide/distribution/androidBuild/index.html

on a Mac, it’s pretty much copy/paste as long as you change out the filename for the keystore and provide your new alias. It helps to have done a “cd” (Change Directory) command to the folder where the keystore file exists to avoid having to type the path to the keystore file name in the keytool command.

Rob