mcpField
A
android-emulator

android-emulator

github.com/callstack测试与质量5.2k4.8k 次安装今天更新
代码仓库

关于 android-emulator

为 Agent 提供通过 agent-device 驱动 Android 模拟器的操作指南,适用于应用交互任务。它强调先由用户安装 CLI,并按需查阅对应主题帮助。

主要功能

  1. 01通过 agent-device 操作 Android 模拟器
  2. 02明确要求用户负责安装和升级
  3. 03按任务查阅对应帮助主题
  4. 04依据交互快照和错误提示操作

适用场景

  1. 01在 Android 模拟器中打开并操作应用
  2. 02进行模拟器应用调试或验证
  3. 03处理 React Native 与 Expo 运行时任务

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/callstack/agent-device --skill android-emulator

安装后在 Claude Code 中输入/android-emulator确认已加载。

详细介绍

Android 模拟器

在操作模拟器之前,需单独安装 agent-device CLI:

npm install -g agent-device@latest

安装和升级应由用户自行完成。不要自动运行该命令,也不要替换为可变的 npx -y agent-device@latest 调用。

对于常规的应用操作任务,请立即开始。不要先使用 --help、--version、devices、appstate、snapshot 或 screenshot 进行探查。打开应用或包 ID 时,请明确指定 Android:

agent-device open <app-or-package-id> --platform android --foreground

按照初始交互式快照和错误提示进行纠正。如果 shell 报告 agent-device 不可用,请停止操作,并请用户安装它,或将其现有安装路径添加到 PATH。

只有在任务较为特殊或命令格式不明确时,才查阅与版本匹配的相关帮助主题:

agent-device help validate        # engineering validation and build freshness
agent-device help debugging       # screenshots, logs, traces, video, and failures
agent-device help react-native    # React Native and Expo runtime guidance
agent-device help react-devtools  # React components, props/state/hooks, render profiling
agent-device help scripting       # durable replay and CI workflows

评论

支持 Markdown