This is regarding Godot v4.1.stable.official [970459615] (at this moment the latest stable release (as far as I know)) for MacOs.
I made a game some time ago in Java using libgdx but have since ported it to Godot. I have finished about 80% of the game and now want to export it to Android. And I am stuck now.
I followed the steps to export an Android project, Android Studio was already installed, sdk is updated to the most recent platform info, Java version is 17 and Gradle is version 8.3.
When I start the ‘Export Project…’ option and click save to define the file I want to save my aab (tried apk as wel, same result), the gradle logging window is shown and after a few moments the output window shows this error:
editor/export/editor_export_platform.h:178 - Export: Building of Android project failed, check output for the error. Alternatively visit docs.godotengine.org for Android build documentation.
It says ‘Check output for the error’ but the only thing I see in the Output window is that error. The gradle logging window has disappeared and I am left with only this single error that does not really give much info.
What I have done:
- I have searched for the Gradle logfiles to no avail
- The keystore should have the same main password as the password for the ‘alias’ in the keystore. I have exported the alias from my main keystore and created a new keystore with just this 1 entry and the passwords for the store itself and the alias are the same. If I do a compile using another keystore, i get a message “[Code signing]: Could not find keystore, unable to export.” When I use the correct keystore it does not give a message which makes me think the keystore is not the problem.
- I read a suggestion to start the Godot app from the command line so that error would be visible in the console. I tried to start the app from the cli but it returns when the app is started and no additional logging is shown.
My question, is there a way to get logging from the 'Export Project...' command? Or is there anything else I can do to get some more info from this process?
[Added later] I have checked the source code of editor/export/editor_export_platform.h on
https://github.com/godotengine/godot/tree/master/editor/export
but did not find something useful, it's just the 'add message to log' method that is called, but as the error does not have a stacktrace I can not determine who calls this method.
In the project, there is a directory 'android' in the main project (this probably only exists when you have created an Android export) and there is some logging at ./android/build/build/outputs /logs but this does not show any useful (to me) info.
Can you successfully run "Remote Debug"?
I think I also had a similar error on MacOS. I installed Java via "brew" and I had to create a "symlink".
My environment variables (for export via Godot and also for Android Studio to compile Godot Engine)