bazel query --output=build @android_test_support//tools/android/emulated_devices/generic_phone:android_23_x86
ERROR: Traceback (most recent call last):
File "/home/simeonwarren/.cache/bazel/_bazel_simeonwarren/8d894fd52f9ebddc50ede8e0430ca405/external/+_repo_rules+android_test_support/tools/android/emulated_devices/generic_phone/BUILD.bazel", line 13, column 12, in <toplevel>
make_device(
File "/home/simeonwarren/.cache/bazel/_bazel_simeonwarren/8d894fd52f9ebddc50ede8e0430ca405/external/+_repo_rules+android_test_support/tools/android/emulated_devices/macro/make_device.bzl", line 120, column 16, in make_device
new_devices(
File "/home/simeonwarren/.cache/bazel/_bazel_simeonwarren/8d894fd52f9ebddc50ede8e0430ca405/external/+_repo_rules+android_test_support/tools/android/emulated_devices/macro/make_device.bzl", line 258, column 48, in new_devices
_new_devices_for_image_and_emulator(
File "/home/simeonwarren/.cache/bazel/_bazel_simeonwarren/8d894fd52f9ebddc50ede8e0430ca405/external/+_repo_rules+android_test_support/tools/android/emulated_devices/macro/make_device.bzl", line 327, column 24, in _new_devices_for_image_and_emulator
make_android_device(
File "/home/simeonwarren/.cache/bazel/_bazel_simeonwarren/8d894fd52f9ebddc50ede8e0430ca405/external/+_repo_rules+android_test_support/tools/android/emulated_devices/macro/make_device.bzl", line 350, column 11, in make_android_device
native.android_device(
Error: no native function or rule 'android_device'
Bazel 8 removed all native Android rules, including
android_device, and I can't find any information about it.How can I use emulators with bazel 8?
I wanted to set up an instrumentation test:
Stacktrace
Environment:
bazel_dep(name = "rules_android", version = "0.6.6")Fedora Linux 41 (Server Edition)8.4.2It seems like I can use a local emulator, so it's not as big of a problem as I thought: