本文介绍了D/FlutterActivityAndFragmentDelegate(29168):没有提供首选的FlutterEngine.为此FlutterFragment.Flutter创建一个新的FlutterEngine:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在运行Android flutter应用程序时遇到问题.昨天,我的应用成功运行,没有任何问题.但是今天,每当我尝试运行我的应用程序时,它始终会为我提供下一个输出,并且不会运行.调试控制台会继续打印这些内容:

I have a problem running my android flutter app.Yesterday, my app ran successfully without any problem.But today, whenever I try to run my app, it always gives me the next outputs and doesn't run.The debug console keeps printing these :

Launching lib/main.dart on SM A405FN in debug mode...
✓ Built build/app/outputs/apk/debug/app-debug.apk.
D/FlutterActivity(29168): Using the launch theme as normal theme.
D/FlutterActivityAndFragmentDelegate(29168): Setting up FlutterEngine.
D/FlutterActivityAndFragmentDelegate(29168): No preferred FlutterEngine was provided. Creating a new FlutterEngine for this FlutterFragment.
D/FlutterActivityAndFragmentDelegate(29168): Attaching FlutterEngine to the Activity that owns this Fragment.

奇怪的是,我的应用程序一直在手机上停止运行.

And weirdly, my app keeps stopping on my phone.

如果您想知道我的flutter doctor -v,我可以向您保证一切都很好.

If you wonder about my flutter doctor -v, I can assure you that everything is fine.

[flutter] flutter doctor -v
[✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Linux, locale en_US.UTF-8)
    • Flutter version 1.12.13+hotfix.8 at /home/henimbola/dev_env/flutter
    • Framework revision 0b8abb4724 (3 weeks ago), 2020-02-11 11:44:36 -0800
    • Engine revision e1e6ced81d
    • Dart version 2.7.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /home/henimbola/Android/Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /home/henimbola/IDEs/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Android Studio (version 3.6)
    • Android Studio at /home/henimbola/IDEs/android-studio
    • Flutter plugin version 43.0.2
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[!] IntelliJ IDEA Ultimate Edition (version 2019.2)
    • IntelliJ at /home/henimbola/IDEs/idea-IU-192.6603.28
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.dev/intellij-setup/#installing-the-plugins

[✓] VS Code (version 1.42.1)
    • VS Code at /usr/share/code
    • Flutter extension version 3.8.1

[✓] Connected device (1 available)
    • SM A405FN • R58M66L8L9J • android-arm64 • Android 9 (API 28)

! Doctor found issues in 1 category.
exit code 0

如果有人可以帮助我,请.我一直在互联网上搜索.

If anyone can help me please. I've been searching around the internet.

推荐答案

在升级到最新版本的Flutter之后,这个问题发生在我身上.我通过运行以下命令解决了该问题:

This problem happened to me after I upgraded to the latest version of Flutter.I solved it by running the command:

flutter clean

这解决了我的问题.

这篇关于D/FlutterActivityAndFragmentDelegate(29168):没有提供首选的FlutterEngine.为此FlutterFragment.Flutter创建一个新的FlutterEngine:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 14:39