Conflicting error messages about Android SDK version
- Dominant language
- C++
- Stars
- 2.6k
- Forks
- 260
- PR merge metrics
- No merged PRs in 30d
Description
OS: macOS Monterey 12.3 with Apple M1
Bazel: 4.2.0
I installed Android Studio with SDK versions 32 and 30

```
$ bazel build ...
DEBUG: /private/var/tmp/_bazel_kyle/787332d199f8834b82f4563a4310b447/external/io_grpc_grpc_java/java_grpc_library.bzl:188:14: Multiple values in 'deps' is deprecated in local_service_java_grpc
INFO: Repository org_checkerframework_checker_qual_jar_sources_3_13_0 instantiated at:
/Users/kyle/projects/zetasql/WORKSPACE:67:21: in
/private/var/tmp/_bazel_kyle/787332d199f8834b82f4563a4310b447/external/maven/defs.bzl:670:14: in pinned_maven_install
Repository rule http_file defined at:
/private/var/tmp/_bazel_kyle/787332d199f8834b82f4563a4310b447/external/bazel_tools/tools/build_defs/repo/http.bzl:426:28: in
ERROR: Error fetching repository: /Users/kyle/projects/zetasql/WORKSPACE:85:20: Android SDK api level 29 was requested but it is not installed in the Android SDK at /Applications/Android Studio.app/sdk. The api levels found were [32, 30]. Please choose an available api level or install api level 29 from the Android SDK Manager.
ERROR: Analysis of target '//bazel:bison' failed; build aborted: Android SDK api level 29 was requested but it is not installed in the Android SDK at /Applications/Android Studio.app/sdk. The api levels found were [32, 30]. Please choose an available api level or install api level 29 from the Android SDK Manager.
INFO: Elapsed time: 0.513s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded, 0 targets configured)
currently loading: @com_github_grpc_grpc//src/compiler
Fetching @local_config_cc_toolchains; fetching
Fetching @upb; fetching
```
To fix that error message, I installed version 29 of the Android SDK

But that causes another error here:
```
$ bazel build ...
DEBUG: /private/var/tmp/_bazel_kyle/787332d199f8834b82f4563a4310b447/external/io_grpc_grpc_java/java_grpc_library.bzl:188:14: Multiple values in 'deps' is deprecated in local_service_java_grpc
ERROR: Error fetching repository: /Users/kyle/projects/zetasql/WORKSPACE:85:20: Bazel requires Android build tools version 30.0.0 or newer, 29.0.2 was provided
INFO: Repository io_grpc_grpc_api_jar_sources_1_43_2 instantiated at:
/Users/kyle/projects/zetasql/WORKSPACE:67:21: in
/private/var/tmp/_bazel_kyle/787332d199f8834b82f4563a4310b447/external/maven/defs.bzl:316:14: in pinned_maven_install
Repository rule http_file defined at:
/private/var/tmp/_bazel_kyle/787332d199f8834b82f4563a4310b447/external/bazel_tools/tools/build_defs/repo/http.bzl:426:28: in
ERROR: Analysis of target '//javatests/com/google/zetasql:gen_tests_jni_AnalyzerOptionsTest' failed; build aborted: Bazel requires Android build tools version 30.0.0 or newer, 29.0.2 was provided
INFO: Elapsed time: 1.439s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (23 packages loaded, 110 targets configured)
Fetching @local_config_cc_toolchains; fetching
Fetching @com_google_protobuf_protobuf_java_jar_sources_3_19_3; fetching
```
Contributor guide
Assessment
This issue has not been assessed yet.