【发布时间】:2020-03-18 18:06:14
【问题描述】:
我正在尝试使用模拟器,当我启动它时,它开始加载,但它没有在 VSCode 中连接。如何连接以便 VSCode 检测到它?
当我启动 adb-server 时,我得到以下输出
adb server version (40) doesn't match this client (39); killing...
ADB server didn't ACK
Full server startup log: /tmp/adb.1000.log
Server had pid: 31775
--- adb starting (pid 31775) ---
adb I 11-22 22:58:24 31775 31775 main.cpp:57] Android Debug Bridge version 1.0.39
adb I 11-22 22:58:24 31775 31775 main.cpp:57] Version 1:8.1.0+r23-5~18.04
adb I 11-22 22:58:24 31775 31775 main.cpp:57] Installed as /usr/lib/android-sdk/platform-tools/adb
adb I 11-22 22:58:24 31775 31775 main.cpp:57]
adb I 11-22 22:58:24 31775 31775 adb_auth_host.cpp:416] adb_auth_init...
adb I 11-22 22:58:24 31775 31775 adb_auth_host.cpp:174] read_key_file '/home/sahil/.android/adbkey'...
adb I 11-22 22:58:24 31775 31775 adb_auth_host.cpp:391] adb_auth_inotify_init...
adb server killed by remote request
* failed to start daemon
error: cannot connect to daemon
flutter doctor日志:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.9.1+hotfix.4, on Linux, locale en_GB.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[!] Android Studio (version 3.2)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[!] IntelliJ IDEA Ultimate Edition (version 2019.2)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.35.1)
[!] Connected device
! Doctor found issues in 3 categories.
flutter devices日志:
No devices detected.
Run 'flutter emulators' to list and start any available device emulators.
Or, if you expected your device to be detected, please run "flutter doctor" to
diagnose potential issues, or visit https://flutter.dev/setup/ for troubleshooting
tips.
• Device emulator-5554 is offline.
【问题讨论】:
-
这很可能是由于安装了 2 个版本的 adb 造成的
标签: android android-studio flutter dart visual-studio-code