3

I am a totally rookie in flutter project development and recently i have run into a tech issue that the flutter can not detect the android simulator even the simulator is on ; The issue as below: enter image description here

Flutter console:
F:\Developer\demo>flutter doctor -v
[√] Flutter (Channel beta, v0.7.3, on Microsoft Windows [Version 10.0.17134.228], locale zh-CN)
    • Flutter version 0.7.3 at D:\flutter_windows_v0.7.3-beta\flutter
    • Framework revision 3b309bda07 (3 months ago), 2018-08-28 12:39:24 -0700
    • Engine revision af42b6dc95
    • Dart version 2.1.0-dev.1.0.flutter-ccb16f7282

[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at D:\Android\android-sdk-windows
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = D:\Android\android-sdk-windows
    • Java binary at: D:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
    • All Android licenses accepted.

[√] Android Studio (version 3.1)
    • Android Studio at D:\Program Files\Android\Android Studio
    • Flutter plugin version 28.0.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)

[!] Connected devices
    ! No devices available

! Doctor found issues in 1 category.

So, is there anything i am going wrong?

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567
zhouwangsheng
  • 383
  • 1
  • 4
  • 10

1 Answers1

1

First check if your devices were listed:

In terminal, run the flutter devices command to verify that Flutter recognizes your connected Android device.

You can follow the installation guide provided in the Flutter documentation:

Windows set-up

Install Android Studio

  1. Download and install Android Studio.
  2. Start Android Studio, and go through the ‘Android Studio Setup Wizard’. This installs the latest Android SDK, Android SDK Command-line Tools, and Android SDK Build-Tools, which are required by Flutter when developing for Android.

Set up your Android device

To prepare to run and test your Flutter app on an Android device, you need an Android device running Android 4.1 (API level 16) or higher.

  1. Enable Developer options and USB debugging on your device. Detailed instructions are available in the Android documentation.
  2. Windows-only: Install the Google USB Driver.
  3. Using a USB cable, plug your phone into your computer. If prompted on your device, authorize your computer to access your device.
  4. n the terminal, run the flutter devices command to verify that Flutter recognizes your connected Android device. By default, Flutter uses the version of the Android SDK where your adb tool is based. If you want Flutter to use a different installation of the Android SDK, you must set the ANDROID_SDK_ROOT environment variable to that installation directory.

Set up the Android emulator

To prepare to run and test your Flutter app on the Android emulator, follow these steps:

  1. Enable VM acceleration on your machine.

  2. Launch Android Studio, click the AVD Manager icon, and select Create Virtual Device…

    • In older versions of Android Studio, you should instead launch Android Studio > Tools > Android > AVD Manager and select Create Virtual Device…. (The Android submenu is only present when inside an Android project.)
    • If you do not have a project open, you can choose Configure > AVD Manager and select Create Virtual Device…
  3. Choose a device definition and select Next.

  4. Select one or more system images for the Android versions you want to emulate, and select Next. An x86 or x86_64 image is recommended.

  5. Under Emulated Performance, select Hardware - GLES 2.0 to enable hardware acceleration.

  6. Verify the AVD configuration is correct, and select Finish.

    For details on the above steps, see Managing AVDs.

  7. In Android Virtual Device Manager, click Run in the toolbar. The emulator starts up and displays the default canvas for your selected OS version and device.

Try to check this SO post as well. It is related to your question.

MαπμQμαπkγVπ.0
  • 5,887
  • 1
  • 27
  • 65