From 591e2931ba6897a91b83ce4c71b0717141057c2a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E1=B5=87=E1=B5=92?= <40080007@qq.com>
Date: Tue, 29 Oct 2024 10:53:47 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20Android=20Studio=20Flutter=20=E5=B7=A5?=
=?UTF-8?q?=E7=A8=8B=E6=97=A0=E6=B3=95=E8=AF=86=E5=88=AB=20adb=20=E8=AE=BE?=
=?UTF-8?q?=E5=A4=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
_posts/2024-10-29-Flutter-no-devices.md | 41 +++++++++++++++++++++++++
1 file changed, 41 insertions(+)
create mode 100644 _posts/2024-10-29-Flutter-no-devices.md
diff --git a/_posts/2024-10-29-Flutter-no-devices.md b/_posts/2024-10-29-Flutter-no-devices.md
new file mode 100644
index 0000000..ac6b5e3
--- /dev/null
+++ b/_posts/2024-10-29-Flutter-no-devices.md
@@ -0,0 +1,41 @@
+---
+layout: post
+title: AS Flutter 工程无法识别 adb 设备
+date: 2024-10-29 10:30:00 +0800
+categories: flutter
+tags: flutter
+published: true
+---
+
+* content
+{:toc}
+
+用 Android Studio 打开 Flutter 工程的时候 IDE 无法识别 adb 设备,一同打开的 Android native 工程却可以识别到 adb 设备。
+
+在终端使用命令 `flutter devices` 发现手机设备已连接:
+
+```bash
+$ flutter devices
+
+Found 3 connected devices:
+ 22101320C (mobile) • 9c232ca6 • android-arm64 • Android 13 (API 33)
+ Linux (desktop) • linux • linux-x64 • Ubuntu 24.04.1 LTS
+ 6.8.0-47-generic
+ Chrome (web) • chrome • web-javascript • Google Chrome 129.0.6668.89
+
+Run "flutter emulators" to list and start any available device emulators.
+
+If you expected another device to be detected, please run "flutter doctor" to
+diagnose potential issues. You may also try increasing the time to wait for
+connected devices with the "--device-timeout" flag. Visit
+https://flutter.dev/setup/ for troubleshooting tips.
+```
+
+使用 `flutter run` 也可以把项目正常运行在连接的手机上。
+所以猜测应该是某项 flutter 配置问题,搜索发现是没有配置 flutter 的 android sdk:
+
+```bash
+$ flutter config --android-sdk
+```
+
+
\ No newline at end of file