Export to Android fails

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By FelixTemari

I followed the official Godot docs guide on how to export to Android but unfortunately everything fails for me. I’m using an AdMob plugin and export with Gradle which simply tells me this: editor/export/editor_export_platform.h:173 - Export: Building of Android project failed, check output for the error. Alternatively visit docs.godotengine.org for Android build documentation. The output just shows the same message with no extra details. No other errors or details are shown. If I try to export without Gradle it manages to produce an apk however it then fails to install on the device with “App not installed” message.

Godot v4.0.3.stable.official [5222a99f5]
JDK 11.0.9

What can I do to maybe gather more information about the problem? Can I somehow see more details about the error and debug?

:bust_in_silhouette: Reply From: platerytter

Just registered to ask the very same question.

However im on a mac, trying to deply on meta quest 2.

I managed to build to my pixel phone, so the process works but whenever I follow the online guides / youtube about exporting to Meta Quest 2 I end up with the very same error message :

“— Debug adapter server started —
— GDScript language server started —
Add Autoload
0 param: --xr_mode_openxr
1 param: --use_immersive
editor/export/editor_export_platform.h:173 - Export: Building of Android project failed, check output for the error. Alternatively visit docs.godotengine.org for Android build documentation.”

Sorry if this isnt related, but it throws the same error message.

Figured out for me as well, turns out the mac version of the openXR tools are not properly supported. Had to move back to linux and it all works fine now.

platerytter | 2023-06-09 11:44

:bust_in_silhouette: Reply From: FelixTemari

Okay, I figured out what was wrong (at least in my case). The directory my project was in had a colon in it’s name. That was failing the build.

2 straight days of digging all around the internet and trying everything possible. Changed the engine packaging, bios settings, installed a bunch of stuff, changed many system variables. In the end I’ve created an empty project and started copying my project setting by setting and seeing where it would break and stop exporting, until I’ve copied an entire project and it exported successfully. Truly a computer science moment.