godot icon indicating copy to clipboard operation
godot copied to clipboard

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

Open ChrisBase opened this issue 1 year ago • 3 comments

  • Fixes: https://github.com/godotengine/godot/issues/94815

Test environment

Godot Engine v4.3.rc1.official Windows 11 Pro, Version 23H2, Build 22631.3880

Issue

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.
This issue should also affect other operating systems but i have only tested in windows. The error message printed in the console looks like this:

Could not create child process: keytool -list -keystore ******** -storepass ******** -alias ********

Fix

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.
The proposed fix replaces all occurrences of the hardcoded "keytool" with a string returned by get_keytool_path.

ChrisBase avatar Jul 26 '24 17:07 ChrisBase

Please open a dedicated bug report to track this properly

AThousandShips avatar Jul 26 '24 17:07 AThousandShips

Related issue: #94815

ChrisBase avatar Jul 26 '24 18:07 ChrisBase

Looks good, thanks for the fix!

It is a pleasure to support such a great project!

ChrisBase avatar Jul 27 '24 00:07 ChrisBase

Thanks! And congrats for your first merged Godot contribution :tada:

akien-mga avatar Jul 28 '24 15:07 akien-mga