0

Disclaimer: I am a newbie to using the emulators and flutter.

Question: How do I get flutter to connect to an emulator for debugging? Or, how do I create/set-up an emulated device properly so that my android studio flutter application recognizes it as a valid device?

I am not sure if it matters but I am currently working behind a proxy server. However, I have already added the appropriate certificates to the android ide.

The emulator I created is a Pixel 2, with API-28. I set it to allow developer options.

Using the new project part of the IDE I created a new flutter project in offline mode.

I expected the application to open in debug mode on my emulator but instead it says it doesn't think any device is connected. I ran flutter doctor and this is the output I received.

F:\SDKs\flutter_windows_v1.5.4-hotfix.2-stable\flutter\bin\flutter.bat doctor --verbose
[√] Flutter (Channel stable, v1.5.4-hotfix.2, on Microsoft Windows [Version 6.1.7601], locale en-US)
    • Flutter version 1.5.4-hotfix.2 at F:\SDKs\flutter_windows_v1.5.4-hotfix.2-stable\flutter
    • Framework revision 7a4c33425d (8 weeks ago), 2019-04-29 11:05:24 -0700
    • Engine revision 52c7a1e849
    • Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
    • Android SDK at C:\Users\SWahlin-Rhoades\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.0
    • Java binary at: F:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[√] Android Studio (version 3.4)
    • Android Studio at F:\Program Files\Android\Android Studio
    • Flutter plugin version 36.1.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[!] 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.
Process finished with exit code 0

I am aware of the thread device-emulator-55-is-not-authorized-android however, it didn't solve my problem. Within the thread it doesn't specify what new AVD was created in the solution and the other option of turing on developer settings didn't work.

Sierra
  • 11
  • 5
  • Possible duplicate of [Device emulator-5554 is not authorized. (Android)](https://stackoverflow.com/questions/54531829/device-emulator-5554-is-not-authorized-android) – Mikhail Tokarev Jun 24 '19 at 18:11
  • I saw that issue but it didn't solve my problem. There wasn't a description as to what emulator was created, and the other option of turning on the developer options on my emulator didn't work. – Sierra Jun 24 '19 at 19:03
  • Also I don't think I mentioned it but I'm using Visual Studio 3.4 – Sierra Jun 24 '19 at 19:05

1 Answers1

0

I took another look at the Device_emulator_5554 answer and attempted to create another emulator Nexus S API 28 and I can now use it for debugging.

Sierra
  • 11
  • 5