So, here's a step-by-step for signing, using Construct 2, CocoonJS Cloud Compiler, the Java Development Kit & the Android SDK on Windows 7.
1. Install all prerequisites:
I used default values for everything, apparently this can cause an issue with the path variables (like directions to executable files given by the computer) - so you may want to locate everything in a simple directory like C:\Java. As it was I installed everything a long time ago and had yet to run into this situation, so I had to set a new PATH variable from the command line after I updated my Android SDK.
will tell you where your Java Developer Kit is installed, a folder named /jdk.#.#.# (jdk followed by the current version number). Mine was installed in the /Program Files/Java/ directory, so before signing I had to set the java home, replace jdk.# with your folder name.
set JAVA_HOME = C:\Programs Files\Java\jdk.#.#.#
2. Create a folder at C:\Android, it'll make these next steps easier.
3. Next you have to generate a unique KEYSTORE using the Java tool Keytool - located in your jdk.#.#.# folder, my default location was:
Open a Command Prompt window on the \bin folder by holding SHIFT and right clicking in file explorer and choosing Open Command Prompt Here. At the command prompt type:
keytool -genkey -v -keystore C:\Android\YOURAPPNAME.keystore -alias YOURAPPNAME -keyalg RSA -keysize 2048 -validity 10000
Replacing the parts I put 'YOURAPPNAME' with your app. You'll be asked for name, company and location details and well as for two passwords. Set all these and remember them well. Once you've signed and uploaded a file you'll have to use the same key file each time you update it. I've saved the signing settings for each app as a text file to make this process a simple cut and paste operation.
4. Use Jarsigner to sign your app file from CocoonJS. Unzip the file they sent you and drag the "Release_Unsigned.apk" version to your C:\Android folder, rename it to something easy like "Your_App_Name_release.apk". In the Command Prompt window we opened in the last step, type:
jarsigner -verbose -keystore C:\Android\YOURAPPNAME.keystore C:\Android\YOURAPPNAME_release.apk YOURAPPNAME
If you don't get errors you can move onto the final step.
5. You can close the Command Prompt window now. We'll open another one from the location of our Android SDK installations Tools folder. My default location was at:
C:\Program Files (x86)\Android\android-sdk\tools
SHIFT+Click on the Tools folder and choose Open a Command Prompt Here. Then type:
zipalign -v 4 C:\Android\YOURAPPNAME_release.apk C:\Android\YOURAPPNAME_releaseYOURRELEASENUMBER.apk
To generate a final, uploadable file. It will generate a file with Your_App_Name_release001.apk to upload to the Google Play store. Remember, once it's done and uploaded you have to keep using this same keystore, so back it up and protect the access codes so you can continually update the same listing in the store. Changing this keystore value requires uploading your new app version as a whole new store listing.
Once you've uploaded a version and go back to update the listing later, you'll just do the last two steps, Jarsigner and Zipalign using the KEYSTORE file you created for the first step.