gpt4 book ai didi

android-studio - 我无法使用 Flutter 执行示例应用程序

转载 作者:IT王子 更新时间:2023-10-29 06:58:54 30 4
gpt4 key购买 nike

您好,我正在学习 flutter,我有一个 adv Nexus 5 api 19 x86 和 android studio 3.3,在 Windows 10 上,我使用 flutter、文件、新项目等创建了示例应用...,然后尝试执行该应用程序,它安装在 adv 中,但在初始化时崩溃,我没有显示任何错误。并且 flutter doctor 没有返回任何问题。

flutter --doctor 输出

flutter.bat doctor --verbose
[√] Flutter (Channel beta, v1.0.0, on Microsoft Windows [Versión 10.0.17134.523], locale es-ES)
• Flutter version 1.0.0 at C:\flutter
• Framework revision 5391447fae (7 weeks 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 28.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-28, build-tools 28.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 31.3.3
• Dart plugin version 182.5124
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[√] VS Code (version 1.30.2)
• VS Code at C:\Users\User\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 2.21.1

[√] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 4.4.2 (API 19) (emulator)

• No issues found!
Process finished with exit code 0

作为android项目执行时的Logcat错误

01-18 20:31:36.767 1794-2763/com.google.android.gms.persistent E/NetworkScheduler: Invalid component specified.
01-18 20:31:36.847 1177-1177/? E/Drm: Failed to open plugin directory /vendor/lib/mediadrm
01-18 20:31:58.137 1794-2560/com.google.android.gms.persistent E/WakeLock: GCM_HB_ALARM release without a matched acquire!
01-18 20:46:56.207 3375-3375/? E/memtrack: Couldn't load memtrack module (No such file or directory)
01-18 20:46:56.217 3375-3375/? E/android.os.Debug: failed to load memtrack module: -2
01-18 20:46:56.627 3386-3386/? E/memtrack: Couldn't load memtrack module (No such file or directory)
01-18 20:46:56.627 3386-3386/? E/android.os.Debug: failed to load memtrack module: -2
01-18 20:46:57.517 3402-3402/? E/memtrack: Couldn't load memtrack module (No such file or directory)
01-18 20:46:57.517 3402-3402/? E/android.os.Debug: failed to load memtrack module: -2
01-18 20:46:59.297 3431-3431/? E/memtrack: Couldn't load memtrack module (No such file or directory)
01-18 20:46:59.307 3431-3431/? E/android.os.Debug: failed to load memtrack module: -2
01-18 20:46:59.807 3449-3449/? A/libc: Fatal signal 8 (SIGFPE) at 0xb774dac8 (code=1), thread 3449 (scom.flutterapp)
01-18 20:47:00.657 1971-1971/com.android.launcher E/EGL_emulation: tid 1971: eglSurfaceAttrib(1199): error 0x3009 (EGL_BAD_MATCH)
01-18 20:48:05.657 1177-1666/? E/Drm: Failed to open plugin directory /vendor/lib/mediadrm
01-18 20:59:19.707 3478-3478/? E/memtrack: Couldn't load memtrack module (No such file or directory)
01-18 20:59:19.707 3478-3478/? E/android.os.Debug: failed to load memtrack module: -2
01-18 20:59:22.007 3510-3510/? E/memtrack: Couldn't load memtrack module (No such file or directory)
01-18 20:59:22.007 3510-3510/? E/android.os.Debug: failed to load memtrack module: -2
01-18 20:59:22.127 3521-3527/? E/jdwp: Failed sending reply to debugger: Broken pipe
01-18 20:59:22.477 3521-3521/? A/libc: Fatal signal 8 (SIGFPE) at 0xb774dac8 (code=1), thread 3521 (scom.flutterapp)
01-18 20:59:23.317 1971-1971/com.android.launcher E/EGL_emulation: tid 1971: eglSurfaceAttrib(1199): error 0x3009 (EGL_BAD_MATCH)

Logcat 像 android 项目一样冗长

01-18 20:59:22.907 1597-3538/system_process W/ActivityManager:   Force finishing activity tlalocescom.flutterapp/.MainActivity
01-18 20:59:22.967 2113-2290/com.google.android.gms I/Icing: Indexing com.google.android.googlequicksearchbox-applications from com.google.android.googlequicksearchbox
01-18 20:59:23.217 1597-3538/system_process I/WindowManager: Screenshot max retries 4 of Token{9d1c6470 ActivityRecord{9d0afcc8 u0 tlalocescom.flutterapp/.MainActivity t9 f}} appWin=Window{9d14e2f0 u0 Starting tlalocescom.flutterapp} drawState=4
01-18 20:59:23.217 1597-3538/system_process W/WindowManager: Screenshot failure taking screenshot for (1080x1920) to layer 21010
01-18 20:59:23.217 1597-3538/system_process W/ActivityManager: Exception thrown during pause
android.os.DeadObjectException
at android.os.BinderProxy.transact(Native Method)
at android.app.ApplicationThreadProxy.schedulePauseActivity(ApplicationThreadNative.java:660)
at com.android.server.am.ActivityStack.startPausingLocked(ActivityStack.java:761)
at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:2455)
at com.android.server.am.ActivityStack.finishTopRunningActivityLocked(ActivityStack.java:2329)
at com.android.server.am.ActivityStackSupervisor.finishTopRunningActivityLocked(ActivityStackSupervisor.java:2035)
at com.android.server.am.ActivityManagerService.handleAppCrashLocked(ActivityManagerService.java:9543)
at com.android.server.am.ActivityManagerService.makeAppCrashingLocked(ActivityManagerService.java:9436)
at com.android.server.am.ActivityManagerService.crashApplication(ActivityManagerService.java:10081)
at com.android.server.am.ActivityManagerService.handleApplicationCrashInner(ActivityManagerService.java:9632)
at com.android.server.am.NativeCrashListener$NativeCrashReporter.run(NativeCrashListener.java:86)
01-18 20:59:23.227 1597-1846/system_process I/ActivityManager: Process tlalocescom.flutterapp (pid 3521) has died.

关于我可以执行 Flutter 项目的任何想法?

最佳答案

所以我们的考虑是正确的,这确实是一个错误。

我把答案贴出来供引用。

Here the issue you have opened.

作为此 one 的副本,它已被贡献者关闭.

这确实证实了这是一个错误。

正如我在评论中所说,我可以确认在运行 API 级别 19 的物​​理设备中一切正常。

关于android-studio - 我无法使用 Flutter 执行示例应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54260988/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com