无法找到开发设备Flutter

时间:2018-10-07 07:33:57

标签: android-studio dart flutter adb device

我对扑打有​​疑问。我安装了Android Studio并将其配置为Flutter(安装Flutter和Dart),但无法在任何设备上运行我的应用,并且返回了Android Studio控制台:

Unable to locate a development device; please run 'flutter doctor' for information about installing additional components.

和扑医生-v:

[✓] Flutter (Channel beta, v0.8.2, on Linux, locale en_US.UTF-8)
    • Flutter version 0.8.2 at /home/mostafa/Dev/Flutter/flutter
    • Framework revision 5ab9e70727 (4 weeks ago), 2018-09-07 12:33:05 -0700
    • Engine revision 58a1894a1c
    • Dart version 2.1.0-dev.3.1.flutter-760a9690c2
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at /media/mostafa/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/mostafa/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-1136-b06)
    • All Android licenses accepted.
[✓] Android Studio (version 3.2)
    • Android Studio at /usr/local/android-studio
    • Flutter plugin version 29.0.2
    • Dart plugin version 181.5540.11
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
[!] Connected devices
    ! No devices available
! Doctor found issues in 1 category.

有时会识别设备或虚拟设备:

[✓] Connected devices (1 available)
• LG E610 • 6a1f40e3 • android-arm • Android 4.3.1 (API 18)

我录制了一段视频以作更好的描述(1.1 MB): enter link description here

请帮助我!

1 个答案:

答案 0 :(得分:0)

仅设置ANDROID_SDK_ROOT环境变量是不够的。为了使它对我有用,我还必须这样做:

flutter config --android-sdk $ANDROID_SDK_ROOT

当我重新启动Android Studio时,它开始为我工作