簡體   English   中英

在vscode中調試flutter應用程序時顯示錯誤

[英]Display an error while debug the flutter App in vscode

我無法在Vscode中調試我的Flutter應用,並且DEBUG CONSOL返回了:

無法找到開發設備; 請運行“ flutter doctor”以獲取有關安裝其他組件的信息。

運行以下命令后,我可以顯示仿真器:

顫振模擬器

我可以運行它:

顫振模擬器-啟動4.7_WXGA_API_22

撲醫生-v:

[✓] Flutter (Channel stable, v1.7.8+hotfix.4, on Linux, locale en_US.UTF-8)
    • Flutter version 1.7.8+hotfix.4 at /home/ZZZ/Dev/Flutter/flutter
    • Framework revision 20e59316b8 (10 days ago), 2019-07-18 20:04:33 -0700
    • Engine revision fee001c93f
    • Dart version 2.4.0


[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /media/ZZZ/B0B8B687B8B64C1A/Dev_ubuntu/android-sdk-linux/
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /media/ZZZ/B0B8B687B8B64C1A/Dev_ubuntu/android-sdk-linux/
    • Java binary at: /usr/local/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b16-5323222)
    • All Android licenses accepted.

[✓] Android Studio (version 3.4)
    • Android Studio at /usr/local/android-studio
    • Flutter plugin version 37.1.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b16-5323222)

[✓] VS Code (version 1.36.1)
    • VS Code at /usr/share/code
    • Flutter extension version 3.2.0

[✓] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 5.1.1 (API 22) (emulator)

• No issues found!

我的操作系統是Ubuntu 18.04,我想使用仿真器進行調試,請幫助我。

您有3種選擇:

  1. 您可以在Android Studio中打開模擬器,然后從VSCode調試應用程序。

  2. 您還可以檢查計算機中是否安裝了adb(Android調試器橋)。

  3. 否則,您可以在真實設備中運行您的應用程序。

我的問題已通過此命令解決

flutter config --android-sdk <sdk-location>

鏈接

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM