You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Android] Honor standard SDK environment variables in build_android_library.sh #22682
bugmodule: androidIssues related to Android code, build, and executionmodule: build/installIssues related to the cmake and buck2 builds, and to installing ExecuTorch
scripts/build_android_library.sh currently derives Gradle ANDROID_HOME only from ANDROID_SDK, with /opt/android/sdk as the fallback. GitHub Android runners and many developer environments set ANDROID_HOME or ANDROID_SDK_ROOT instead, so the script can ignore the configured SDK and point Gradle at the wrong path.
This was found while validating the Android documentation in #22620. The implementation change is intentionally excluded from that documentation-only PR.
Proposed change
Resolve the SDK path from ANDROID_SDK, then ANDROID_HOME, then ANDROID_SDK_ROOT, with the existing fallback. Pass the resolved path to Gradle through both standard variables.
Test plan
Exercise the script with each supported environment variable independently.
bugmodule: androidIssues related to Android code, build, and executionmodule: build/installIssues related to the cmake and buck2 builds, and to installing ExecuTorch
Activity
[docs] Refresh README, runtime APIs, and success stories (#22620)
fix(android): honor ANDROID_HOME/ANDROID_SDK_ROOT in build_android_li…