【问题标题】:Emulator not authorized模拟器未授权
【发布时间】:2019-11-06 12:53:54
【问题描述】:

免责声明:我是使用模拟器和颤振的新手。

问题:如何让 Flutter 连接到模拟器进行调试?或者,如何正确创建/设置模拟设备,以便我的 android studio Flutter 应用程序将其识别为有效设备?

我不确定这是否重要,但我目前正在代理服务器后面工作。但是,我已经在 android ide 中添加了相应的证书。

我创建的模拟器是 Pixel 2,带有 API-28。我将其设置为允许开发者选项。

使用 IDE 的新项目部分,我在离线模式下创建了一个新的 Flutter 项目。

我希望应用程序在我的模拟器上以调试模式打开,但它却说它认为没有连接任何设备。我跑了颤振医生,这是我收到的输出。

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

我知道线程 device-emulator-55-is-not-authorized-android 但是,它并没有解决我的问题。在线程中,它没有指定在解决方案中创建了哪些新的 AVD,并且启用开发人员设置的其他选项不起作用。

【问题讨论】:

  • 我看到了这个问题,但它并没有解决我的问题。没有关于创建什么模拟器的描述,并且在我的模拟器上打开开发者选项的其他选项不起作用。
  • 另外,我认为我没有提到它,但我使用的是 Visual Studio 3.4

标签: android android-studio flutter dart


【解决方案1】:

我再次查看了 Device_emulator_5554 答案并尝试创建另一个模拟器 Nexus S API 28,现在我可以使用它进行调试了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-03-27
    • 2018-04-04
    • 1970-01-01
    • 2021-05-16
    • 2016-12-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多