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

Unset ANDROID_HOME in workflow to fix Android SDK loading error #4206

Merged
merged 1 commit into from
Dec 26, 2024

Conversation

lauraharker
Copy link
Contributor

@lauraharker lauraharker commented Dec 20, 2024

Attempt to fix "ERROR: Analysis of target '//:test/com/google/javascript/jscomp/disambiguate/AmbiguatePropertiesTest' failed; build aborted: Android SDK api level 32 was requested but it is not installed in the Android SDK at /usr/local/lib/android/sdk. The api levels found were [35, 34]. Please choose an available api level or install api level 32 from the Android SDK Manager." - https://github.com/google/closure-compiler/actions/runs/12412367428/job/34652003730

@lauraharker
Copy link
Contributor Author

For some additional context -

unsetting ANDROID_HOME stops some Bazel code from trying to load the Android SDK.

It seems like something changed in our GitHub CI setup, where previously ANDROID_HOME was unset & now it's set?

There might be a better fix but 1) we already did this in the past for a different build script - f1faba6 (for Google's internal CI) and 2) we definitely don't need the Android SDK.

@lauraharker
Copy link
Contributor Author

Note: the Build & Test for this PR did fail, but it failed later on than the current CI runs are doing.

The problem it's hitting now is that we added a Java 21 API usage to the compiler & our Bazel Java rules aren't setup to use Java 21 yet.

But without this PR, we don't even get to the point of seeing the Java 21 error.

@lauraharker lauraharker marked this pull request as ready for review December 20, 2024 23:00
@brad4d brad4d self-assigned this Dec 26, 2024
@brad4d
Copy link
Contributor

brad4d commented Dec 26, 2024

I'm going to import this and get it submitted.

@copybara-service copybara-service bot merged commit 63dc6c0 into google:master Dec 26, 2024
4 of 5 checks passed
brad4d added a commit to google/closure-compiler-npm that referenced this pull request Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants