使い方
- インストールコマンドをコピーし、自分の環境へ導入する前にソースを確認します。
- 必要なツール、認証情報、対応環境を原文で確認します。
- 入力と成果物を指定し、出力を資料と照合します。
npx skills add https://github.com/software-mansion/argent --skill argent-android-emulator-setup開始前の確認
- 導入にはモデル契約、API枠、ファイルへのアクセス許可は含まれません。
- スター数や導入数は活動の指標であり、独立した品質・安全性試験ではありません。
見出し、例、コード、表、リンク、参照画像を含む原文を表示しています。
1. Prerequisites
The Android SDK (platform tools and emulator) and an AVD, created in Android Studio or with avdmanager create avd. If list-devices returns no Android devices and no avds, either no AVD exists or Argent can't find the SDK. Then run argent config set android.sdkRoot <sdk-path> and call list-devices again after a minute: a failed SDK lookup is cached that long. Exporting ANDROID_HOME in your shell doesn't reach the tool-server that is already running.
2. Setup
- Find a ready device: call
list-devices. Filter for entries withplatform: "android". Ready devices (state: "device") come first. If the user named a device, use it. Otherwise pick the firstkind: "emulator"that fits the task. Take a physical phone (kind: "device") only when the user asks for one. If the result has ahintabout the adb server, prefix everyadbcommand that you run yourself, as the hint shows. - Boot if needed: if no such emulator is ready, call
boot-devicewithavdName: <name>from the same call'savdslist.avdsdoesn't mark TV images: for a TV task, pick the AVD by its name.
3. Using the device
Pass the Android serial as udid to the same interaction tools as on iOS. See argent-device-interact for interaction tooling and the Android notes at the bottom of that skill. If a React Native app can't reach Metro, see argent-metro-debugger §1.
4. Notes
- Android TV / leanback AVDs boot through this exact flow, but
list-devicestags themruntimeKind: "tv"and they are focus-driven: use theargent-tv-interactskill, not the gesture tools. - To stop the emulator, run
adb -s <serial> emu killfrom a shell (clean shutdown). Neverpkill -9/kill -9qemu: a hard kill leaves the userdata image dirty, after which cold boots can hang for many minutes doing recovery (runaway writes,boot_completednever flips). If an image gets into that state, boot once with-wipe-datato reset it.