Skip to content

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

Description

@ChrisBase

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions