Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: TheVolumeRemote on Fri 26/04/2024 21:23:20

Title: Generate Android Keystore Error
Post by: TheVolumeRemote on Fri 26/04/2024 21:23:20
I'm attaching screenshot of how I filled it out (sans name and PW). I also tried creating a dummy .jks file but it doesn't want an existing file with the same name. On AGS 3.6.1.23-P1

the file path I directed the generator to was
C:\users\me\keystores\thephantomfellows_keystore.jks
Error: Value cannot be null.
Parameter name: path1
Version: AGS 3.6.1.23

System.ArgumentNullException: Value cannot be null.
Parameter name: path1
   at System.IO.Path.Combine(String path1, String path2)
   at AGS.Editor.Utils.AndroidUtilities.RunGenerateKeystore(AndroidKeystoreData d)
   at AGS.Editor.GenerateAndroidKeystore.buttonGenerate_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

(https://i.ibb.co/9hxdPG4/keystore-error.png) (https://ibb.co/3vxPKkF)
Title: Re: Generate Android Keystore Error
Post by: eri0o on Fri 26/04/2024 21:42:54
Can you show the previous screen in the preferences menu?
Title: Re: Generate Android Keystore Error
Post by: TheVolumeRemote on Fri 26/04/2024 22:11:35
certainly! fingers crossed Im not about to find out Im boneheaded and missed something obvious! of course if that was the case it would less work for you guys so hey, either way lol

(https://i.ibb.co/4dQdcQZ/keystoreerror2.jpg) (https://ibb.co/sHBHhBv)
Title: Re: Generate Android Keystore Error
Post by: eri0o on Sat 27/04/2024 01:26:43
Right you are defaulting to using environment variables to JAVA_HOME and ANDROID_HOME but you haven't set them up. I honestly left that as an option mostly for the case of running AGS Editor in a CI/CD pipeline or if you are already an Android developer that has those set for some reason. If neither is the case then it's probably better if you manually specify - the other advantage would be if you want to set these environment variables to have those path to apply seamlessly to major AGS different versions like ags3 and ags4.

Anyway, you need to set the Android SDK path and the JDK path first.

https://adventuregamestudio.github.io/ags-manual/BuildAndroid.html

I tried to explain this in the manual.

Once these two are correctly set it will appear a "SDK Found" and "JDK Found" there.

I sort of copied this whole interface from game maker where if you haven't set these two it lights up a red text there saying those aren't set. I thought about it but didn't add because: didn't want to copy game maker so much, and also wasn't sure which red to set because of AGS support of color themes.

I think I could also add a help button there that opens this manual page. I will have to think about it.

Spoiler
RANT < Ah, I won't be able to help much in actually puting the game in the play store later soon because Google out of the blue removed my developer account for inactivity AFTER I put an app in Play Console. I reached out to complain and they said they are sorry but they have no system to correct their own mistake and that I need to register a new email to pay and register a new developer account which just made me sign for an apple developer account and not feeling super like publishing things to play store right now.

I also lost all my apps and games in Android forever because of this.

Anyway, but I will keep locally building android stuff and updating the AGS android port. /> RANT
[close]

Edit: I open a PR to help make this a bit better in ags side: https://github.com/adventuregamestudio/ags/pull/2394

Ah, right, in this version you have I forgot to check for minimum password length, which must be bigger than 6, but I am adding this check too in my PR.

Edit: PR is merged so the fix should be in the next 3.6.1 release.
Title: Re: Generate Android Keystore Error
Post by: eri0o on Thu 02/05/2024 00:13:04
@TheVolumeRemote the AGS Editor 3.6.1 Patch 2 released here (https://www.adventuregamestudio.co.uk/forums/ags-engine-editor-releases/ags-3-6-1-patch-2/) has the fix for the issue that happened with you. You will still need to follow the manual and configure the JDK and SDK paths there.

I will leave below the ags-manual pages I think have something relevant for the Android build. Feel free to ask questions or clarifications.

https://adventuregamestudio.github.io/ags-manual/BuildAndroid.html

https://adventuregamestudio.github.io/ags-manual/EditorPreferences.html#android

https://adventuregamestudio.github.io/ags-manual/GeneralSettings.html#android

https://adventuregamestudio.github.io/ags-manual/DistGame.html#compiled-folder-structure
Title: Re: Generate Android Keystore Error
Post by: TheVolumeRemote on Fri 10/05/2024 23:23:20
thank you so much for your help @eri0o I really appreciate you :)