跳到正文
Skillpedia
移动应用5.2k · #15027

android-emulator

它能做什么

它使用 agent-device 命令行工具,在 Android 模拟器上运行和测试原生、React Native、Expo 或 Flutter 应用。适合想在 Android 上验证改动的开发者。

适用场景

  • ✓当你想检查 Android 应用的改动在模拟器中能否正常工作时。
  • ✓当你想在 Android 模拟器上一步步复现一个错误时。
  • ✓当你想获取失败的 Android 应用测试的截图和日志时。

技能链接

https://github.com/callstack/agent-device/blob/main/skills/android-emulator/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/callstack/agent-device/blob/main/skills/android-emulator/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请在 Android 模拟器上启动我的 Flutter 应用,带我完成结账流程,如果有任何步骤失败,请附上截图。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体在模拟器上打开应用,读取屏幕,并通过点击或输入完成各个步骤。某一步失败时,它会收集截图和调试细节。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Android Emulator

Require the agent-device CLI to be installed separately before driving an emulator:

npm install -g agent-device@latest

Treat installation and upgrades as user-owned setup steps. Do not run that command autonomously or substitute a mutable npx -y agent-device@latest invocation.

For a normal app-driving task, start immediately. Do not probe first with --help, --version, devices, appstate, snapshot, or screenshot. Target Android explicitly when opening an app or package id:

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

Follow the initial interactive snapshot and corrective error hints. If the shell reports that agent-device is unavailable, stop and ask the user to install it or expose their existing installation on PATH.

When you finish, if your session booted the emulator, run agent-device close --shutdown, unless the user asks to keep it running.

Only when the task is specialized or a command shape is unclear, read the relevant version-matched help topic:

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
常见问题

我需要先安装什么吗?

需要。在智能体使用之前,你必须自己安装 agent-device 命令行工具。

智能体会替我升级工具吗?

不会。安装和升级都由你自己完成,不属于智能体的工作。

测试结束后模拟器会怎样?

如果会话是由它启动的模拟器,智能体会将其关闭,除非你要求保持运行。

详情

作者的原始描述

Verify and debug native, React Native, Expo, or Flutter apps on an Android Emulator with agent-device. Use when an agent needs to launch an app, inspect its live UI, tap, type, scroll, validate a code change, collect failure evidence, or reproduce a workflow on an Android virtual device.

repo: callstack/agent-device

热度

GitHub 星标
5.2k
排名
#15027
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能