run-android
Build, deploy and visually verify the app on an Android emulator or device via the Capacitor shell, then verify with Maestro. Use when a change touches the native shell, plugins, or needs on-device confirmation.
- License 许可
- MIT
- 最近更新
- 2026-07-16
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- run-android
- description
- Build, deploy and visually verify the app on an Android emulator or device via the Capacitor shell, then verify with Maestro. Use when a change touches the native shell, plugins, or needs on-device confirmation.
03 SKILL.md 正文
Run on Android
pnpm mobile:android [target] # scripts/run-android.sh: web build → cap sync → cap run
The script resolves JDK 21 automatically (Capacitor's Android build requires it; falls back
to Android Studio's bundled JBR) and picks the first connected adb device if no target given.
No device running? Start an emulator first:
export ANDROID_HOME=$HOME/Library/Android/sdk
$ANDROID_HOME/emulator/emulator -avd $($ANDROID_HOME/emulator/emulator -list-avds | head -1) &
$ANDROID_HOME/platform-tools/adb wait-for-device
Verify on device
Use the Maestro MCP tools: list_devices → take_screenshot / inspect_screen with the
device id (e.g. emulator-5554). A screenshot showing the expected screen + a hierarchy
containing your data-testid markers is the pass criterion. Maestro YAML flows live in
e2e/maestro/ (per feature) once they exist.
Troubleshooting
error: invalid source release: 21— build ran with JDK < 21; use the script or exportJAVA_HOMEto a JDK 21+ (Android Studio JBR works).- SDK not found —
apps/app/android/local.propertiesmust containsdk.dir=$HOME/Library/Android/sdk(machine-local file, not committed). - Web changes not visible in the app — you forgot
cap sync(the script always does it). - iOS note: the shell is SPM-based (no CocoaPods).
pnpm --filter app exec cap open iosand run from Xcode; signing is interactive and stays with the human.
04 同仓库更多 Skills
screenshot-verify
Visually verify a UI change in the browser (app dev server, production/PWA build, or Storybook) before claiming it works. The primary agent verification loop (ARCHITECTURE.md §10.6) — no emulator needed.
new-feature
Scaffold a new feature package the canonical way and wire it into the app. This is the ONLY correct way to start a feature (ARCHITECTURE.md §5, §10.2 "one way to do a thing").
implement-spec
Implement a feature end-to-end from its FEAT-xxxx spec — scaffold, code to the fixed contracts, tests per the Verification mapping, full verification pyramid, self-review, MR-ready summary. Usage - /implement-spec FEAT-0002. The spec is the single source of truth; do not invent requirements.
build-verify
Verify this repo exactly like CI does (lint, format, boundaries, dep-cruise, typecheck, tests, build) and fix the common failure classes. Use before claiming any change is done, and to reproduce CI failures locally.
screenshot-verify
暂无简介
run-android
暂无简介