我 "得到这个控制台,同时运行初始计数器应用程序,默认与翩翩。我如何解决这个问题?

问题描述 投票:0回答:2

这是我在调试控制台中得到的大部分内容,当我运行最初的flutter应用程序,与flutter一起。这看起来不正常。我应该怎么做才能解决这个问题?

 Built build/app/outputs/apk/debug/app-debug.apk.
D/FlutterActivity(12595): Using the launch theme as normal theme.
D/FlutterActivityAndFragmentDelegate(12595): Setting up FlutterEngine.
D/FlutterActivityAndFragmentDelegate(12595): No preferred FlutterEngine was provided. Creating a new FlutterEngine for this FlutterFragment.
D/FlutterActivityAndFragmentDelegate(12595): Attaching FlutterEngine to the Activity that owns this Fragment.
D/FlutterView(12595): Attaching to a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@ad2d938
D/FlutterActivityAndFragmentDelegate(12595): Executing Dart entrypoint: main, and sending initial route: /
D/HostConnection(12595): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0
I/Choreographer(12595): Skipped 913 frames!  The application may be doing too much work on its main thread.
D/EGL_emulation(12595): eglMakeCurrent: 0xe02eec60: ver 3 0 (tinfo 0xe030ba70)
D/EGL_emulation(12595): eglMakeCurrent: 0xeb57f3a0: ver 3 0 (tinfo 0xe038db30)
D/EGL_emulation(12595): eglMakeCurrent: 0xe02eede0: ver 3 0 (tinfo 0xe030ba70)
D/EGL_emulation(12595): eglMakeCurrent: 0xeb57f3a0: ver 3 0 (tinfo 0xe038db30)
D/FlutterView(12595): Detaching from a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@ad2d938
D/FlutterView(12595): Detaching from a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@ad2d938
D/EGL_emulation(12595): eglMakeCurrent: 0xeb57f3a0: ver 3 0 (tinfo 0xe038db30)
D/FlutterView(12595): Attaching to a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@ad2d938
D/EGL_emulation(12595): eglCreateContext: 0xe02eede0: maj 3 min 0 rcv 3
D/EGL_emulation(12595): eglMakeCurrent: 0xe02eede0: ver 3 0 (tinfo 0xe030ba70)
I/Choreographer(12595): Skipped 176 frames!  The application may be doing too much work on its main thread.
D/EGL_emulation(12595): eglMakeCurrent: 0xeb57f3a0: ver 3 0 (tinfo 0xe038db30)
D/FlutterView(12595): Attaching to a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@ad2d938
D/EGL_emulation(12595): eglCreateContext: 0xd4b696e0: maj 3 min 0 rcv 3
D/EGL_emulation(12595): eglMakeCurrent: 0xd4b696e0: ver 3 0 (tinfo 0xe030ba70)
I/Choreographer(12595): Skipped 66 frames!  The application may be doing too much work on its main thread.
D/EGL_emulation(12595): eglMakeCurrent: 0xd4b696e0: ver 3 0 (tinfo 0xe030ba70)
Reloaded 1 of 478 libraries in 2,280ms.
flutter flutter-layout
2个回答
1
投票

假设你没有碰过启动代码,跳过的帧数随着你的运行而下降的事实告诉我,这是在你的机器上运行模拟器的自然副产品。一般来说,< 这些消息中的100跳帧可以被安全地忽略--这意味着你的电脑在实时运行模拟器时遇到了困难。

将你的实体Android设备放入 调试模式 然后用电缆连接,然后选择该设备作为你的构建目标。如果你在手机上运行应用,你还会被跳帧吗?如果你运行的是任何一种现代Android手机,你一般不会。

Android模拟器需要大量的处理能力来运行。大多数人 普遍认为 在物理设备上调试比通过仿真器调试要快好几倍。


0
投票

我曾经遇到过同样的问题。当我通过指向发布模式运行应用程序时,问题就解决了。请试一试 flutter run --release 而不是 flutter run

© www.soinside.com 2019 - 2024. All rights reserved.