1

I'm running Android studio as an administrator in Windows 10. The AVD is a Nexus 5X API 28. I'm trying to run the flutter demo, but the device drop-box still shows "no devices", it only has the "Open Android Emulator" option, which I clicked to start the AVD:

enter image description here

The output of

flutter doctor -v

is:

[√] Flutter (Channel stable, v1.0.0, on Microsoft Windows [Version 10.0.17134.407], locale en-US)
    • Flutter version 1.0.0 at C:\Users\User\flutter_windows_v1.0.0-stable\flutter
    • Framework revision 5391447fae (10 days ago), 2018-11-29 19:41:26 -0800
    • Engine revision 7375a0f414
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at C:\Users\User\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: C:\Program Files\Android\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 C:\Program Files\Android\Android Studio
    • Flutter plugin version 31.1.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[!] Connected device
    • Device emulator-5554 is not authorized.
      You might need to check your device for an authorization dialog.

! Doctor found issues in 1 category.

Unlike in a real phone connected via USB, here there is no authorization dialog when I start the AVD. How can I authorize the phone?

Rol
  • 200
  • 1
  • 2
  • 13

2 Answers2

1

This simple solution worked: Wipe data and Cold Boot.

Didn't work:

Note that in the Terminal of the Android studio, adb is not recognized (following flutter installation instructions). You can add the android SDK location path to the PATH environmental variable just to be able to run adb, but this won't give you more information than flutter doctor -v. The android SDK path should be already in Tools|SDK Manager, which is in my case "C:\Users\User\AppData\Local\Android\Sdk", nothing to do with "android-sdk-windows". Killing and restarting adb didn't work.

Logcat shows the message "Please configure Android SDK" (click on "configure", opens "Project Structure" window). The paths to SDK and default JDK are valid. Installing NDK miscofigured something else, so I uninstalled it and left this path field empty. Under "Project", all Version and Repository fields are empty.

Rol
  • 200
  • 1
  • 2
  • 13
-1

You should add ANDROID_HOME variable to your class_path

set ANDROID_HOME=C:\<installation location>\android-sdk-windows
set PATH=%PATH%;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools

Taken from this

After that call flutter doctor -v and flutter devices

Alex Adrianov
  • 312
  • 1
  • 8
  • This could be a fix for issues with the Android toolchain or Studio. Nothing to do with unauthorized devices – Rol Dec 11 '18 at 06:51