Skip to content

[Bazel CI] ERROR: Visibility error: android_toolchain cannot access adb from generated androidsdk repository #468

@deepalak56

Description

@deepalak56

CI: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/5324#019ccba3-2460-437a-9c95-f4815536b1c9

Platform : macos, ubuntu

(05:11:45) ERROR: /Users/buildkite/builds/bk-macos-arm64-2tgu/bazel-org-repo-root/rules_android/toolchains/android/BUILD:22:18: in android_toolchain rule //toolchains/android:android_default: Visibility error:
--
target '@@+android_sdk_repository_extension+androidsdk//:platform-tools/adb' is not visible from
target '//toolchains/android:android_default'
Recommendation: modify the visibility declaration if you think the dependency is legitimate. For more info see https://bazel.build/concepts/visibility. To set the visibility of that source file target, use the exports_files() function
(05:11:45) ERROR: /Users/buildkite/builds/bk-macos-arm64-2tgu/bazel-org-repo-root/rules_android/toolchains/android/BUILD:22:18: Analysis of target '//toolchains/android:android_default' (config: e1d3187) failed
(05:11:45) ERROR: Analysis of target '//src/tools/javatests/com/google/devtools/build/android/sandboxedsdktoolbox/apidescriptors/testlibrary:testlibrary' failed; build aborted: Analysis failed
(05:11:45) INFO: Elapsed time: 67.045s, Critical Path: 4.16s
(05:11:45) INFO: 1377 processes: 603 remote cache hit, 771 internal, 3 darwin-sandbox.
(05:11:45) ERROR: Build did NOT complete successfully
bazel build failed with exit code 1
🚨 Error: The command exited with status 1
user command error: exit status 1

Culprit:

Steps:

git clone clone -v --reference /usr/local/var/bazelbuild/https---github-com-bazelbuild-rules-android-git
git reset c824b39 --hard
export USE_BAZEL_VERSION=d67b13a5d8e8fa2715ae8ebbd4a0ca1b8c1d495a
bazel build --config=remote //...

CC Greenteam @kotlaja

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions