Local build fails with toolchain_java17 not found during Bazel build on macOS (Apple Silicon) #6056
Unanswered
gurnoorpannu
asked this question in
Q&A (Installation)
Replies: 2 comments 3 replies
-
|
@gurnoorpannu, Please see #6021. With our current version of Bazel, we can only use an Android Studio version below Otter. Meanwhile, please take note of this issue affecting Apple Silicon Macs as well: #6046 (comment). |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
@adhiamboperes I’m using Bazel 6.5.0 and I’m not forcing any local Java version (letting Bazel use the remote JDK 11 as intended).But while building the Bazel , I m getting, is this like a known issue? also if there is a walkaround ? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Operating System
macOS (Apple Silicon / arm64)
Android Studio Version
Android Studio Otter2
RAM size
16 GB
Free disk space
~50 GB free
Which step are you stuck on?
I am following the official setup guide:
https://github.com/oppia/oppia-android/wiki/Installing-Oppia-Android#prepare-developer-environment
The failure occurs at the final build step when running:
bazel build //app:app
The setup steps completed successfully before this:
Android SDK installed via Android Studio
Android SDK Build-Tools 34.0.0 installed
Android API Level 35 (android-35) installed
Java tested with 11 and 17
Bazel tested with 6.5.0, 7.4.1, and 8.1.0
Clean clone and clean caches (bazel clean --expunge, cleared ~/.cache/bazelisk)
Android Studio proxy disabled
Error Log
Approaches already used to resolve the issue
Tried Bazel versions: 6.5.0, 7.4.1, 8.1.0
Tried Java versions: 11 and 17
Installed and pinned Android SDK Build-Tools 34.0.0
Installed Android API Level 35
Disabled Android Studio HTTP proxy
Cleared Bazel and Bazelisk caches
Re-cloned the repository from scratch
Verified ANDROID_HOME, ANDROID_SDK_ROOT, and adb detection
Additional information
toolchain_java17 is referenced from app/BUILD.bazel
This toolchain does not appear to exist in @bazel_tools for Bazel 6.x or 7.x
Bazel 8 introduces other incompatibilities due to WORKSPACE / Android repo macros
This suggests a mismatch between the repository’s Java toolchain requirements and the supported Bazel toolchains for local builds
I wanted to check whether:
there is a specific commit/branch that currently builds locally,
a custom/internal Java toolchain is expected,
or if local builds are temporarily broken during the Java 17 / Bazel migration.
Happy to provide more logs or test fixes if helpful.
Beta Was this translation helpful? Give feedback.
All reactions