Open moberer opened 5 months ago
The ANDROID_HOME
environment variable is already read by the Android export code: https://github.com/godotengine/godot/blob/7d151c83811f8ac8873439826c16d88c83aba12f/platform/android/export/export.cpp#L47
The same applies to JAVA_HOME
.
Have you tried setting it before starting the Godot editor? If you set it on a separate line, make sure to use export ANDROID_HOME="..."
.
Unfortunately, this does not seem to work.
(The same path works, if I set it in the Godot settings)
If this is intended to work (which I was unsure about, since it isn't really documented anywhere), I think I should open an issue with Godot-proper.
cc @m4gr3d
Describe the project you are working on
Game to be exported to Android.
Describe the problem or limitation you are having in your project
Android SDK location cannot be set locally, per project. Android SDK location can not be set in an automated way.
This means manual steps are required for every developer trying to export the project to android.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Allow the Android SDK Path to be set
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
E.g.:
GODOT_ANDROID_HOME=/some_folder/dependencies/android-sdk godot
godot --headless --export-release "Android" --android-sdk "../dependencies/android-sdk" "../export/android/Project.apk"
If this enhancement will not be used often, can it be worked around with a few lines of script?
Unfortunately not really.
Developers would have to manually change the Android SDK path in the settings every time.
Is there a reason why this should be core and not an add-on in the asset library?
Not possible to implement. (To my knowledge)