0

Steps to reproduce

  1. Follow Flutter Docs install VSCode, Flutter Extension, Dart Extension
    • Flutter SDK path: D:\dev\flutter
    • VSCode path: D:\Program Files\Microsoft VS Code
  2. Run flutter devices, 4 devices are listed. See Flutter Doctor output below.
  3. Run flutter run -d windows or flutter run -d <mobile phone id> works fine.
  4. Open VSCode, tip 'No Devices' shows, and the popup bar always loading. image
  5. Open Android Studio, the devices status always loading. image
  6. Tried reinstall VSCode, Android Studio, Flutter four times, not work.
  7. tried solutions, none worked.

Actual results

Both VSCode and Android Studio cannot detect my devices that listed by flutter devices command.

Logs

See Flutter Doctor output below.

Flutter Doctor output

Doctor output
> flutter doctor -v [!] Flutter (Channel stable, 3.24.5, on Microsoft Windows [版本 10.0.22631.4460], locale zh-CN) • Flutter version 3.24.5 on channel stable at D:\dev\flutter ! Upstream repository unknown source is not the same as FLUTTER_GIT_URL • FLUTTER_GIT_URL = https://github.com/flutter/flutter.git • Framework revision dec2ee5c1f (2 weeks ago), 2024-11-13 11:13:06 -0800 • Engine revision a18df97ca5 • Dart version 3.5.4 • DevTools version 2.37.3 • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades. [✓] Windows Version (Installed version of Windows is version 10 or higher) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at D:\dev\Android\Sdk • Platform android-34, build-tools 34.0.0 • ANDROID_HOME = D:\dev\Android\Sdk • Java binary at: D:\Program Files\JetBrains\Toolbox\app\Android Studio\jbr\bin\java • Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-b509.11) • All Android licenses accepted. [✓] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe [✓] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.12.2) • Visual Studio at D:\Program Files\Microsoft Visual Studio\2022\Community • Visual Studio Community 2022 version 17.12.35521.163 • Windows 10 SDK version 10.0.22621.0 [✓] Android Studio (version 2024.2) • Android Studio at D:\Program Files\JetBrains\Toolbox\app\Android Studio • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-b509.11) [✓] IntelliJ IDEA Ultimate Edition (version 2024.3) • IntelliJ at D:\Program Files\JetBrains\Toolbox\app\IntelliJ IDEA Ultimate • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart [✓] Proxy Configuration • HTTP_PROXY is set • NO_PROXY is localhost,127.0.0.1,::1 • NO_PROXY contains localhost • NO_PROXY contains ::1 • NO_PROXY contains 127.0.0.1 [✓] Connected device (4 available) • 9f91daaa (mobile) • 9f91daaa • android-arm64 • Android 11 (API 30) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [版本 10.0.22631.4460] • Chrome (web) • chrome • web-javascript • Google Chrome 131.0.6778.86 • Edge (web) • edge • web-javascript • Microsoft Edge 131.0.2903.70 [✓] Network resources • All expected network resources are available. ! Doctor found issues in 1 category. 

</detail

2
  • is there anything related to flutter in %APPDATA%\Code\User\logs? Commented Nov 30, 2024 at 12:46
  • @pskink I only have %APPDATA%\Code\logs, and I found this only. pastebin.com/Cgx8undu Commented Dec 1, 2024 at 13:16

1 Answer 1

0

To work with emulator devices:

In your Visual Studio code, install this extension: Android iOS Emulator.

Prerequisites before using Android emulator devices:

I considered it a GENERAL RULE:

The API level of the target device is important, because your app doesn't run on a system image with an API level that's lower than the one required by your app, as specified in the minSdk attribute in the app manifest file. For more information about the relationship between system API level and minSdk, see Version your app.

To learn more, visit this link: Create and manage virtual devices

Update:

The alternative option to test your project with the emulator devices, install the MobileView extension directly on VS Code.

If you're planning to work with a physical device, ADB Interface for VSCode.

However, to address your issue,

Upstream repository unknown source is not the same as FLUTTER_GIT_URL

Please see this answer to see if it suits to resolve your issue.

Sign up to request clarification or add additional context in comments.

6 Comments

except android, why windows device not listed in the Device Selection in VSCode? The windows option has nothing to do with the Emulator isn't it right?
If you're referring to a mobile emulator, you're right; Windows options are not the right option in dealing with mobile emulator. Btw, I updated my answer just now.
Correction: Android iOS Emulator also handles Android emulator devices; it is very good to use as well. Please give it a try...
I forgot this: I'm using Flutter's First Flutter App tutorial, what I confused is why I have so many virtual and physical devices, and flutter device command also can detect these devices, but the IDE won't show the devices in the Select Options. You can see github.com/user-attachments/assets/…
The FLUTTER_GIT_URL is leading to a new Issue😂see GitHub
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.