Flutter运行停留在安装build \ app \ outputs \ apk \ app.apk [英] Flutter run stuck at Installing build\app\outputs\apk\app.apk

查看:216
本文介绍了Flutter运行停留在安装build \ app \ outputs \ apk \ app.apk的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

重新启动所有内容后,它似乎可以正常工作,没有其他解决方案真正引起注意.

我在以下线程上找不到有用的解决方案:

I couldn't find useful solutions on following thread:

Flutter卡在了安装build \ app \ outputs上\ apk \ app.apk

问题不一样,我的安装还没有完成.

It's not the same issue, mine doesn't finish installing.

我将Honor 7作为连接的设备并使用Visual Studio Code.

I have an Honor 7 as a connected device and using Visual Studio Code.

运行"flutter run"时,会发生以下情况:

When running 'flutter run' following happens:

Launching lib/main.dart on PLK L01 in debug mode...
Initializing gradle...                                       1,1s
Resolving dependencies...                                    3,3s
Gradle task 'assembleDebug'...
Gradle task 'assembleDebug'... Done                         15,6s
Built build\app\outputs\apk\debug\app-debug.apk.
Installing build\app\outputs\apk\app.apk...                     -

一旦加载了最后一步,我的设备就会要求接受应用安装.一旦接受,安装后它将提供2个选项:

Once last step is loading, my device asks to accept app installation. Once accepted it provides 2 options after installation:

  • 打开应用

  • Open App

完成(含义=返回主屏幕)

Finish ( Meaning = return to home screen )

无论哪种方法,最后一步都无法完成. 干净整洁"没有区别.热装不工作.还有其他人遇到这个问题吗?

Either way the last step doesn't finish. 'flutter clean' makes no difference. Hot reload not working. Did anyone else encounter this issue ?

'flutter doctor -v'输出:

'flutter doctor -v' output:

[√] Flutter (Channel stable, v1.0.0, on Microsoft Windows [Version 10.0.17134.590], locale de-DE)
    • Flutter version 1.0.0 at F:\flutter
    • Framework revision 5391447fae (3 months 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 27.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-P, build-tools 27.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-1024-b02)
    • All Android licenses accepted.

[√] Android Studio (version 2.2)
    • Android Studio at E:\Android Studio
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_76-release-b03)

[√] Android Studio (version 3.1)
    • Android Studio at C:\Program Files\Android\Android Studio
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)

[!] IntelliJ IDEA Community Edition (version 2017.3)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.3.2
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.io/intellij-setup/#installing-the-plugins

[!] IntelliJ IDEA Ultimate Edition (version 2017.3)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2017.3.2
    X Flutter plugin not installed; this adds Flutter specific functionality.
    • Dart plugin version 173.4127.31
    • For information about installing plugins, see
      https://flutter.io/intellij-setup/#installing-the-plugins

[√] VS Code, 32-bit edition (version 1.12.2)
    • VS Code at C:\Program Files (x86)\Microsoft VS Code
    • Flutter extension version 2.22.3

[√] Connected device (1 available)
    • PLK L01 • H8WDU15207300112 • android-arm64 • Android 6.0 (API 23)

! Doctor found issues in 2 categories.

推荐答案

解决方案非常简单

对于项目中可能发生的热重装 问题

这是您的设备出现的问题,而不是颤抖 Android Studio

当您的 logcat 挂断时,就会发生这种情况.

您可能要增加您的缓冲区大小.

为此,请进入您的设备模拟器:

设置>开发者选项(确保它们已打开),

将缓冲区大小更改为更大的数字.

然后再次运行 flutter运行-v

Solutions is quite simple

For flutter hot reload problems that may be happening with your project,

It is a problem with your device, and not flutter or Android Studio

This happens when your logcat hangs up.

You might want to increase your buffer size.

To do this, go into your device or emulator:

Settings > Developer options (Ensure they are turned on),

Change the buffer size to a higher number.

Then run flutter run -v again

这篇关于Flutter运行停留在安装build \ app \ outputs \ apk \ app.apk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆