Android Build Keystore Not Valid

Hiya,

Thanks for this insight… the last app I did was over a year or more ago. So really handy to know the JDK is no longer an extra need. Thanks for the heads up.

Before I updated Solar2D. I was able to build using the keystore.

When uploading to Google Play i got the message about it being API 29.

Thats what made me think an update was needed, but since doing so, it wont sign the build off.
Its most frustrating.

I’m generating my keystore and key no problem.

Can you build with the debug key that comes with Solar2D, or are you unable to build with either the debug key or your own?

Could you copy your console log here so that we could better see what might be going on?

make sure you have latest solar2D and JDK 15 for your key
JDK is required to create the keystore but not for building an apk

I’m running: 2022.3683 now.
I’ve moved the keystore to differnt folders. no luck.
I’ve checked the path to Keystore and it shows the correct path. To the best of my knowledge.

Yes - just done a successful debug build.

I just uninstalled and re installed JDK 15 - no luck still.

If the debug keystore works, then it sounds to me like the issue is not with Solar2D, but with your keystore.

Just to double check, did you do as kakula said and use JDK 15 to build your keystore? i.e. don’t just reinstall JDK 15, but install it, rebuild your keystore with it and then try loading the new keystore in Solar2D.

Again, your Solar2D console likely has more details on what is going wrong. Here’s what a successful loading of a keystore should look like:

15:23:44.107  Testing credentials for 'C:\someFolder\myFolder\myKey.keystore': 
15:23:45.408  jar signed.
15:23:45.408  Picked up JAVA_TOOL_OPTIONS: -Duser.language=en
....

If it’s an issue with your keystore being incorrectly created, then this might help:

My console, is not reporting anything at all

Im on a PC, but that is exactly the message I am getting. See screenshots.


JAVA_HOME Path
JAVA_HOME


KeytoolNotValid

I’ve deleted JDK 15 and now tried the process with 19. I can delete the store and JDK and try again - but I feel like im just going round in loops and my console is not reporting anything. The moment I hit the build button, instantly it errors. Nothing runs.

So I followed the suggestions made in this post, see screenshot V2 above.
And still it failed.

Other then copying and pasting these commands, I do not know what to do as I do not understand what all of the instructions in the commends mean.

So having read this article, I get we are creating the key, storing it in the keystore, then converting the type from JKS to PKCS12 but other then this - I’m truely lost as to what the problem is or how to solve

you are using jdk 19

it should be 15
and the name of your package is too short and weird

it’s better be something.something.something at least

Ok, I will repeat the entire process with 15.
But I don’t follow what you mean by the name.
Can you write what you mean as an example?

I think there’s been some confusion. I thought this issue was related to Solar2D, but seems that it is just about creating the keystore.

Regrettably I’ve never had issues with this, so I haven’t spent time debugging it myself and therefore don’t know of some obvious things that might be going wrong.

I’d recommend Googling for your error message:
java.io.filenotfoundexception keystore.jks (the system cannot find the file specified)
java.io.filenotfoundexception (the system cannot find the file specified)

Some StackOverflow answers suggest it could be that your directory isn’t accessible. You could try moving the keystore to another drive and trying it again over there if there’s some inherent security feature preventing you from doing it on C: drive.

For what it’s worth, I try to avoid doing anything in the command line with a directory structure that has spaces in it. Probably just a holdover from being a Windows user in the bad old days, but you might give it a try.

I was able to replicate the issue though I cannot confirm whether the cause is the same, but basically creation is not a problem, but depending on what kind of password you used to create it with will cause issues when accessing it.

Try something like Thisislongpassword2022! as password for testing purpose.

Also, I do not have Java installed, I use the same Java files included in Solard2D, so my JAVA_HOME variable is set to C:\Program Files (x86)\Corona Labs\Corona\jre

EDIT:
Actually, tried to do additional testing and the old password that didn’t work before is working now.
Not really sure what that was about, but now I can’t seem to replicate the issue.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.