Open blackears opened 11 months ago
Make sure that you have Java 17 configured as your default Java version. Gradle errors are cryptic, but this is what this one means.
How do I tell Godot which Java distro to use? I have more than one installed and didn't see any configuration setting for that?
I installed Java 17, set JAVA_HOME to point to it and restarted Godot, but am still getting the same error.
I'm doing this on windows, and when I open a new command prompt, java --version
returns java 19.0.1. where java
returns four different Java installations. How do I tell Godot which Java to use?
I've uninstalled my other Java distros, but am still running into the problem that Godot is trying to use Java 19, even though it's no longer installed on my system. Also, my environment variables have javaHome set to C:\Program Files\Java\jdk-17
.
param: --xr_mode_regular
1 param: --use_immersive
editor/export/editor_export_platform.h:182 - Export: Building of Android project failed, check output for the error:
FAILURE: Build failed with an exception.
* What went wrong:
The supplied javaHome seems to be invalid. I cannot find the java executable. Tried location: C:\Program Files\Java\jdk-19\bin\java.exe
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
I also feel that Godot ought to be able to handle multiple versions of Java being installed on a system. I don't want to have to uninstall my higher Java distros every time I want to have Godot compile for Android.
You can set path to desired java sdk in editor settings.
Tested versions
v4.2.stable.official [46dc27791]
System information
Windows 10 - Mobile
Issue description
I'm trying to create an .aab file which I can upload to the Google Play store. Unfortunately, the process is failing. I have followed the instructions on the Androind for Java page and am able to compile and run on my locally attached phone for debugging - I'm just unable to export. I've updated Android studio to update and include the recommended packages. Androidn studio is alsu running gradle with version 17. I'm not sure what I can do to resolve this.
Steps to reproduce
Attempt to export a Godot project to Android's .AAB format.
Minimal reproduction project (MRP)
N/A