godot icon indicating copy to clipboard operation
godot copied to clipboard

Android export failing with custom keystores and no JDK setup in the OS environment

Open ChrisBase opened this issue 1 year ago • 2 comments

Tested versions

  • Reproducible in: v4.3.rc1.official e343dbbcc
  • Tested on: Windows 11 Pro, Version 23H2, Build 22631.3880

System information

Windows 11 - Godot v4.3.rc1.official

Issue description

Export for Android fails on Windows if there is no path to a JDK set in the PATH environment variable and debug and/or release keystores have been set in the options dialg of the export window. The error messages printed in the console looks like this:

Could not create child process: keytool -list -keystore ******** -storepass ******** -alias ********
Error: There was a problem validating the keystore username and password

The reason for this is that the static function has_valid_keystore_credentials in platform/android/export/export_plugin.cpp runs the hardcoded "keytool" command instead of using get_keytool_path to get the correct path that uses the export/android/java_sdk_path setting.

Steps to reproduce

Tested on Windows

  1. Ensure your PATH variable doesn't contain any JDK binary directoy
  2. In Godot open Project > Export ... and select an Android export
  3. Specify a Debug and/or Release keystore
  4. Execute Export Project...

Minimal reproduction project (MRP)

Should be reproducable with any project

ChrisBase avatar Jul 26 '24 18:07 ChrisBase

image This error happens. Tried in RC1. Same happened in Beta 2 & 3. not sure about B1.

mcdz avatar Jul 27 '24 21:07 mcdz

This error happens. Tried in RC1. Same happened in Beta 2 & 3. not sure about B1.

You can workaround this issue by adding the path to the bin folder of a JDK to your PATH environment variable.

ChrisBase avatar Jul 28 '24 00:07 ChrisBase

same here. my workaround: image

tambunancoder avatar Jul 28 '24 15:07 tambunancoder