颤振热重装不起作用。需要帮助

时间:2020-05-24 10:55:10

标签: android flutter

Flutter热重载不适用于intelliJ / Android Studio。

Buttons

一旦我在运行Android Q并已扎根的Poco F1上运行该应用程序,该应用程序就会在设备上运行,但是我无法重新运行该应用程序或对其进行热加载,则必须停止并重新构建。

我能够从应用程序中获取日志,因此没有连接问题。

我尝试过的事情:

  1. 扑打干净
  2. 增加的记录器缓冲区大小
  3. 尝试使用Android Q模拟器
  4. 尝试使用Android P模拟器
  5. 尝试使用Android P的设备
  6. 更改频道

以下是我扑打的医生-v:

[√] Flutter (Channel stable, v1.12.13+hotfix.9, on Microsoft Windows [Version 10.0.18362.836], locale en-IN)
    • Flutter version 1.12.13+hotfix.9 at C:\tools\flutter
    • Framework revision f139b11009 (8 weeks ago), 2020-03-30 13:57:30 -0700
    • Engine revision af51afceb8
    • Dart version 2.7.2


[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at C:\Users\Ghost\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.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-1248-b01)
    • All Android licenses accepted.

[√] Android Studio (version 3.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 34.0.1
    • Dart plugin version 182.5215
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[√] IntelliJ IDEA Community Edition (version 2019.3)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.3.2
    • Flutter plugin version 45.1.2
    • Dart plugin version 193.6015.53

[√] Connected device (1 available)
    • POCO F1 • 50c8824d • android-arm64 • Android 10 (API 29)

• No issues found!

如果我执行Flutter,请运行:

Launching lib\main.dart on POCO F1 in debug mode...
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done                         6.5s
√ Built build\app\outputs\apk\debug\app-debug.apk.
D/FlutterActivity(29390): Using the launch theme as normal theme.
D/FlutterActivityAndFragmentDelegate(29390): Setting up FlutterEngine.
D/FlutterActivityAndFragmentDelegate(29390): No preferred FlutterEngine was provided. Creating a new FlutterEngine for this FlutterFragment.
D/FlutterActivityAndFragmentDelegate(29390): Attaching FlutterEngine to the Activity that owns this Fragment.
D/FlutterView(29390): Attaching to a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@cdd7e8a
D/FlutterActivityAndFragmentDelegate(29390): Executing Dart entrypoint: main, and sending initial route: /

依赖项:

dependencies:
  flutter:
    sdk: flutter
  http: ^0.12.0+4
  shared_preferences:
  google_fonts:

因此,即使我关闭设备上的应用程序,main.dart也不会停止。

任何主意是什么原因导致此问题以及如何解决?

1 个答案:

答案 0 :(得分:1)

我之前也遇到过同样的问题。我遇到了较旧的flutter版本的问题。运行以下命令

flutter clean
flutter upgrade

现在尝试运行该应用程序并检查热重装。