Windows: Android tools report platform-tools not found despite working adb
## Summary
On Windows, Argent cannot detect Android platform-tools/ADB even when `adb` is installed and working, causing Android tools (`list-devices`, `boot-device`, `launch-app`) to fail.
## Environment
- OS: Windows (VS Code workspace)
- Argent version: `0.8.0`
- Flutter app project (Android emulator in use)
- Running emulator: `emulator-5554` (AVD `Medium_Phone`)
- Android SDK path: `C:\Users\raouf\AppData\Local\Android\Sdk`
- `adb` path: `C:\Users\raouf\AppData\Local\Android\Sdk\platform-tools\adb.exe`
## What works
- `adb devices -l` returns the running emulator.
- `flutter devices` returns `emulator-5554`.
## What fails
### 1) Argent device discovery
```bash
argent run list-devices
```
Result:
```json
{ "devices": [], "avds": [] }
```
### 2) Argent boot-device (Android)
```bash
argent run boot-device --avdName Medium_Phone
```
Result:
```
Android SDK Platform Tools not found. Install with `brew install --cask android-platform-tools` or via Android Studio → SDK Manager. If installed, ensure `adb` is on PATH or set `$ANDROID_HOME` to the SDK root (the resolver checks `$ANDROID_HOME/platform-tools/adb`). Only required for Android devices and emulators.
Assertion failed: !(handle->flags & UV_HANDLE_CLOSING), file src\win\async.c, line 76
```
### 3) Argent launch-app (Android)
Invoked via MCP `launch-app` with:
- `udid: emulator-5554`
- bundle id test target (e.g. `com.android.settings`)
Result: same **Android SDK Platform Tools not found** error.
## Repro steps
1. Start Android emulator (e.g. AVD `Medium_Phone`) so `adb devices` shows `emulator-5554`.
2. Confirm `adb` exists at `%ANDROID_HOME%\platform-tools\adb.exe`.
3. Run `argent run list-devices`.
4. Run `argent run boot-device --avdName Medium_Phone`.
## Expected behavior
- Argent should detect Android devices/AVDs when `adb` is available and emulator is running.
- `list-devices` should include Android entries.
- `boot-device` should attach/boot successfully without platform-tools error.
## Actual behavior
- Android is treated as unavailable (`devices: []`, `avds: []`).
- Android actions fail with "Platform Tools not found" despite valid SDK + working `adb`.
## Additional notes
- Set env vars and restarted VS Code:
- `ANDROID_HOME=C:\Users\raouf\AppData\Local\Android\Sdk`
- `ANDROID_SDK_ROOT=C:\Users\raouf\AppData\Local\Android\Sdk`
- Also tested injecting env + PATH inline before Argent command; behavior unchanged.
Potentially this is a Windows-specific environment/path resolution issue in Argent's Android tooling process.
0 条评论