Android Build: Java Jdk Was Not Found

Hi there,

I’m new to Corona, though have been using other game dev tools for a year or so. I downloaded Corona tonight and after building a basic game, installed Java JDK 6 (I had 7 on my PC).

When I try to build, even as a debug, a screen pop appears saying:

“The password for alias %s wasnot valid, or the Java JDK was not found”

I also received the simulator output:

jarsigner returned: -1073741511

I get the same error when using my own keystore, which has previously been used to publish to Google Play.

I’ve tried searching the forums, but can’t find any related posts. Is anyone able to assist?

Many thanks,

Andy

Hi Andy,

Do you still have JDK7 on the machine? On Windows, multiple versions of the JDK can coexist on the same machine without any problems. We’ve tested this with both a 32-bit and 64-bit version of the JDK 6 installed and a 32-bit and 64-bit version of the JDK 7 installed as well. Corona will automatically pick up the 32-bit JDK 6 path from the registry and use the correct version.

The only known issue that we have is if the PATH environment variable is set to one of the other JDKs, then the final build step will use the wrong JDK version to sign the APK, causing it to be digitally signed wrong and prevent the app from being installed on an Android device… because Android only supports the 32-bit JDK 6. Oracle/Sun does not set the PATH environment variable when installing the JDK, but I suspect that some 3rd party Java tools do, causing this issue to come up every once in a while.

Also, if you have any questions/issues with the keystore, please read the “App Signing” section of this guide:

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

Best regards,

Brent

Thanks Brent,

I spent a lot of time tweaking the environment variables, but nothing was working. I eventually rolled back the Java JDK from update 43 to update 38 and it picked it up straight away, all is working now!!! I didn’t even need to reboot, so it seems for me that there’s a glitch in 43 that stopped the apk signing process.

…I’m looking forward to diving head first into Corona now!!

Hi Andy,

Do you still have JDK7 on the machine? On Windows, multiple versions of the JDK can coexist on the same machine without any problems. We’ve tested this with both a 32-bit and 64-bit version of the JDK 6 installed and a 32-bit and 64-bit version of the JDK 7 installed as well. Corona will automatically pick up the 32-bit JDK 6 path from the registry and use the correct version.

The only known issue that we have is if the PATH environment variable is set to one of the other JDKs, then the final build step will use the wrong JDK version to sign the APK, causing it to be digitally signed wrong and prevent the app from being installed on an Android device… because Android only supports the 32-bit JDK 6. Oracle/Sun does not set the PATH environment variable when installing the JDK, but I suspect that some 3rd party Java tools do, causing this issue to come up every once in a while.

Also, if you have any questions/issues with the keystore, please read the “App Signing” section of this guide:

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

Best regards,

Brent

Thanks Brent,

I spent a lot of time tweaking the environment variables, but nothing was working. I eventually rolled back the Java JDK from update 43 to update 38 and it picked it up straight away, all is working now!!! I didn’t even need to reboot, so it seems for me that there’s a glitch in 43 that stopped the apk signing process.

…I’m looking forward to diving head first into Corona now!!

Hi, I have the same issue. I checked my java -version from command prompt in windows and i get the version 1.6.0_31. I am not sure what steps should i take to be able to successfully build my android app. Thanks in advance.

Hi, I have the same issue. I checked my java -version from command prompt in windows and i get the version 1.6.0_31. I am not sure what steps should i take to be able to successfully build my android app. Thanks in advance.