I'm trying to figure out how to export my project so that it runs on my android phone and am having little luck. I remember being able to do this about a year ago, but Java and Android have updated since then so I started out by upgrading everything to the latest.
I currently seem to be able to compile an APK file (even though I get a warning that the JDK cannot be found (not sure how it's compiling). However, when I try to build an AAB I get an error that javaHome is invalid. I'm not sure why because the JAVA_HOME I've set in the environment variables (I'm using Windows), points to my recent install of OpenJDK 11 as recommended by the latest documentation. But Godot is still looking for it in my old install of Java which is no longer present:
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\jdk1.8.0_151\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
Exit Code: 1
I'm not sure why Godot is looking in this location since I have rebooted. I installed the OpenJDK 11 that the latest stable documentation recommends, but it is apparently not being found.
One other thing - I remember from before that an icon would appear in the top right of the menu bar (alongside the other run buttons) that would allow me to run/debug my project on my Android phone, but that no longer seems to be appearing. How to I get that back?