Missing `android_device`
维护者通常 6 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 32/100
- Issue 类型
- 文档
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- android
- 领域
- mobile-dev, testing
调研方向
从链接的 Android 插桩测试文档开始,使用 rules_android 0.6.6 在 Bazel 8.4.2 上复现所示的 bazel query。将缺失的 android_device 失败与 issue 中引用的本地模拟器 flags 进行比较;完成标准是明确记录受支持的 Bazel 8 模拟器工作流或其替代方案。
由索引模型根据 Issue 内容生成。
描述
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
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'
Environment:
- Rules:
bazel_dep(name = "rules_android", version = "0.6.6") - OS:
Fedora Linux 41 (Server Edition) - Bazel:
8.4.2
It seems like I can use a local emulator, so it's not as big of a problem as I thought:
Bazel also supports testing directly on a locally launched emulator or connected device. Pass the flags --test_strategy=exclusive and --test_arg=--device_broker_type=LOCAL_ADB_SERVER to enable local testing mode. If there is more than one connected device, pass the flag --test_arg=--device_serial_number=$device_id where $device_id is the id of the device/emulator listed in adb devices.
- 主要语言
- Java
- 星标
- 205
- 派生
- 113
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
bazelbuild/rules_android 的其他 Issue
-
build_java8_legacy_dex.sh does not set JAVA_RUNFILES for the d8/r8 launchers可能已有人在做 @TrapsterDK 于 17 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 72/100
bazelbuild/rules_android#599 ·
维护者通常 6 天内回复
-
`Desugar` actions don't run on multiplex workers可能已有人在做 @lukaciko 于 46 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
bazelbuild/rules_android#539 · 2 条评论 ·
维护者通常 6 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
bazelbuild/rules_android#535 · 2 个 reaction ·
维护者通常 6 天内回复
-
desugar_globals output is not reproducible (zip entry order varies)可能已有人在做 @TrapsterDK 于 6 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 30/100
bazelbuild/rules_android#610 ·
维护者通常 6 天内回复
-
难度 2/5 1-3 小时 新手友好度 42/100
bazelbuild/rules_android#602 ·
维护者通常 6 天内回复
查看 bazelbuild/rules_android 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
Lincoln-cn/JAiRouter#1473 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
exercism/java-analyzer#379 ·
-
area: ui bug priority: low
难度 2/5 1-3 小时 新手友好度 66/100
tetsuji16/microProject#1893 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
liberation-data/fornax4j#325 ·
维护者通常 1 天内回复
-
[Bug]: FE and Kinesis extraction pipes render flow starting at the centre and scroll the source arm backwards可能已有人在做 @chonkzillaofficial 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 79/100
BCCE-team/BuildCraft#85 ·