Saturday, April 21, 2012

Creating a Android Keystore For Corona SDK

I recently had some trouble creating a keystore for an Android app I was developing for Corona SDK. Below are the steps I used to generate it. I did this on Windows 8 consumer preview but it should work just fine for Windows 7.

  1. Find where your Java jdk is installed and open up the bin folder. Mine was located at C:\Program Files (x86)\Java\jdk1.6.0_31\bin.
  2. Open a command prompt in this directory. A quick way to do this is by shift clicking in the directory and selecting "Open Command Window Here".
  3. Run the command "keytool -genkey -v -keystore C:\Temp\my-release-key.keystore -alias MyAppName -keyalg RSA -keysize 2048 -validity 10000". Modify these parameters for your situation.
  4. Enter a password for the keystore when prompted. The password has to be at least 6  characters.
  5. Enter your information for each question it asks you.
  6. Screenshots of this process are shown below.

Creating a Android keystore for Corona SDK
Creating a Android keystore for Corona SDK

Using the keystore in Corona SDK
Using the keystore in Corona SDK

4 comments:

  1. [Storing C:\Temp\my-release-key.keystore]
    keytool error: java.io.FileNotFoundException: C:\Temp\my-release-key.keystore (T
    he system cannot find the path specified)
    java.io.FileNotFoundException: C:\Temp\my-release-key.keystore (The system canno
    t find the path specified)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.(FileOutputStream.java:194)
    at java.io.FileOutputStream.(FileOutputStream.java:84)
    at sun.security.tools.KeyTool.doCommands(KeyTool.java:902)
    at sun.security.tools.KeyTool.run(KeyTool.java:172)
    at sun.security.tools.KeyTool.main(KeyTool.java:166)

    ReplyDelete
  2. it shows this error how can i solve this

    ReplyDelete
    Replies
    1. Run your command prompt as administrator, navigate to the right directory and then retry. Should do the trick.
      Thank me later.

      Delete