diff --git a/src/test/shell/bazel/android/android_helper.sh b/src/test/shell/bazel/android/android_helper.sh index a8b942d506dd58..2cb7864a4c2867 100755 --- a/src/test/shell/bazel/android/android_helper.sh +++ b/src/test/shell/bazel/android/android_helper.sh @@ -115,7 +115,7 @@ function resolve_android_toolchains() { echo "This test uses platform-based Android toolchain resolution." add_to_bazelrc "build --incompatible_enable_android_toolchain_resolution" add_to_bazelrc "build --incompatible_enable_cc_toolchain_resolution" - add_to_bazelrc "build --platforms=//test_android_platforms:simple" + add_to_bazelrc "build --android_platforms=//test_android_platforms:simple" else echo "This test uses legacy Android toolchains." add_to_bazelrc "build --noincompatible_enable_android_toolchain_resolution" diff --git a/src/test/shell/bazel/android/android_local_test_integration_test.sh b/src/test/shell/bazel/android/android_local_test_integration_test.sh index 3aa761ff11c791..0c5cf553450e01 100755 --- a/src/test/shell/bazel/android/android_local_test_integration_test.sh +++ b/src/test/shell/bazel/android/android_local_test_integration_test.sh @@ -34,11 +34,6 @@ fail_if_no_android_sdk source "${CURRENT_DIR}/../../integration_test_setup.sh" \ || { echo "integration_test_setup.sh not found!" >&2; exit 1; } -if [[ "$1" = '--with_platforms' ]]; then - # TODO(https://github.com/bazelbuild/bazel/issues/19829): Re-enable when - # android_local_test works properly with Android platforms. - exit 0 -fi resolve_android_toolchains "$1" function setup_android_local_test_env() { diff --git a/tools/android/android_sdk_repository_template.bzl b/tools/android/android_sdk_repository_template.bzl index 0da0416429b214..04c073000c784c 100644 --- a/tools/android/android_sdk_repository_template.bzl +++ b/tools/android/android_sdk_repository_template.bzl @@ -199,9 +199,6 @@ def create_android_sdk_rules( native.toolchain( name = "sdk-%d-toolchain" % api_level, exec_compatible_with = HOST_CONSTRAINTS, - target_compatible_with = [ - "@platforms//os:android", - ], toolchain = ":sdk-%d" % api_level, toolchain_type = "@bazel_tools//tools/android:sdk_toolchain_type", )