Unable to locate a development device Flutter

久未见 提交于 2021-01-28 09:24:06

问题


I have a probleme with flutter. I install Android Studio and configure that for flutter (install flutter and Dart) but I can't run my app on any device and android studio console returned:

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

and flutter doctor -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.

and sometimes device or virtual device Are identified:

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

I recorded a video for Better description (1.1 MB): enter link description here

please help me!


回答1:


It's not enough to simply set the ANDROID_SDK_ROOT environment variable. For this to work for me, I had to also do:

flutter config --android-sdk $ANDROID_SDK_ROOT

When I restarted Android studio, it started to work for me



来源:https://stackoverflow.com/questions/52686397/unable-to-locate-a-development-device-flutter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!