Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ANDROID_SDK_ROOT is deprecated, use ANDROID_HOME instead #80910

Closed
Mrcubix opened this issue Aug 23, 2023 · 5 comments · Fixed by #84316
Closed

ANDROID_SDK_ROOT is deprecated, use ANDROID_HOME instead #80910

Mrcubix opened this issue Aug 23, 2023 · 5 comments · Fixed by #84316

Comments

@Mrcubix
Copy link

Mrcubix commented Aug 23, 2023

Godot version

all | 6758a7f

System information

Windows 10 21H2

Issue description

Building export templates with scons requires user to define the ANDROID_SDK_ROOT variable, which has been made deprecated long ago, ANDROID_HOME should be used instead.

This will avoid people having to figure out why android isn't considered a valid platform when having a proper setup.

see this section | fallback

They may not check for ANDROID_SDK_ROOT in the future, so it's advised to use this newer variable instead.

Steps to reproduce

N/A

Minimal reproduction project

N/A

@philippesic
Copy link
Contributor

Should just be replacing all instances of ANDROID_SDK_ROOT with ANDROID_HOME if I'm not mistaken.

Will open a pr upon confirmation.

@Calinou
Copy link
Member

Calinou commented Aug 23, 2023

For reference, ANDROID_HOME used to be read as a fallback until 48efd56.

On the other hand, the Android export plugin already uses ANDROID_HOME:

OS::get_singleton()->set_environment("ANDROID_HOME", sdk_path); //set and overwrite if required

@Mrcubix
Copy link
Author

Mrcubix commented Aug 23, 2023

Note that the Android SDK & the MAUI check tool (used for MAUI and Avalonia) for example, does not require the path to be strictly of the root, they may also check for the presence of an additional folder called android-sdk in the case the specified folder isn't exactly the root of the SDK on Windows.

@duarteroso
Copy link

Had some issues building because of just that 👍🏽

return os.environ.get("ANDROID_SDK_ROOT", -1)

@Calinou
Copy link
Member

Calinou commented Aug 23, 2023

Should just be replacing all instances of ANDROID_SDK_ROOT with ANDROID_HOME if I'm not mistaken.

Will open a pr upon confirmation.

Feel free to open a PR for this, but please keep reading ANDROID_SDK_ROOT as a fallback to avoid breaking existing builds (especially on CI).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants