flutter run
运行crash,只有 flutter run --release
才能正常执行。
正常运行
运行 crash
用 flutter create --platform ohos prjname
创建的项目,除了设置签名不做任何修改。
E Thread:548316182544 [ERROR:flutter/shell/platform/ohos/library_loader.cpp(188)] Init NAPI Failed.
E Thread:548316182544 [ERROR:flutter/shell/platform/ohos/ohos_shell_holder.cpp(107)] ERROR EACCES
E Thread:548316182544 [ERROR:flutter/shell/platform/ohos/ohos_shell_holder.cpp(107)] ERROR EACCES
E system font file not found
E FlutterLoader --> can not find buildinfo.json5 file.
E Thread:548316182544 [ERROR:flutter/shell/platform/ohos/ohos_shell_holder.cpp(107)] ERROR EACCES
E Thread:548316182544 [ERROR:flutter/shell/platform/ohos/ohos_shell_holder.cpp(107)] ERROR EACCES
E system font file not found
E FlutterLoader --> can not find buildinfo.json5 file.
F Thread:548316182544 [FATAL:flutter/runtime/dart_vm_initializer.cc(89)] Error while initializing the Dart VM: Wrong full snapshot version, expected '25523e38d22932934b1f691de39b5c14' found 'd20a1be77c3d3c41b2a5accaee1ce549'
E FML KILL PROCESS
[✓] Flutter (Channel oh-3.22.0, 3.22.1-0.0.pre.22, on macOS 15.1.1 24B2091
darwin-arm64, locale zh-Hans-CN)
[✓] HarmonyOS toolchain - develop for HarmonyOS devices
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[!] Xcode - develop for iOS and macOS (Xcode 16.2)
✗ Unable to get list of installed Simulator runtimes.
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.2)
[✓] IntelliJ IDEA Community Edition (version 2024.3.1.1)
[✓] VS Code (version 1.96.2)
[✓] Connected device (4 available)
您好,暂未复现
首先用3.22创建的项目一定会有buildinfo.json5这个模板文件,其次,直接创建的demo项目需要移除FAB按钮才能在模拟器上运行
建议您移除sdk的cache之后重新构建一下
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
确实是 cache 的问题,移除后,错误提示不一样了,这是 tab 的问题,(tab 问题用 release 反而可以正常)
E Thread:548316182544 [ERROR:flutter/shell/platform/ohos/library_loader.cpp(188)] Init NAPI Failed.
E Thread:548316182544 [ERROR:flutter/shell/platform/ohos/ohos_shell_holder.cpp(107)] ERROR EACCES
E Thread:548316182544 [ERROR:flutter/shell/platform/ohos/ohos_shell_holder.cpp(107)] ERROR EACCES
E system font file not found
E Thread:548316182544 [ERROR:flutter/shell/platform/ohos/ohos_shell_holder.cpp(107)] ERROR EACCES
E Thread:548316182544 [ERROR:flutter/shell/platform/ohos/ohos_shell_holder.cpp(107)] ERROR EACCES
E system font file not found
E PlatformPlugin --> Failed to obtain the top window. Cause: {}
E FlutterViewTag --> UIContext is null, cannot send Settings!
E PlatformPlugin --> Failed to obtain the top window. Cause: {"code":1300002}
E Thread:547643967880 [ERROR:flutter/common/graphics/persistent_cache.cc(253)] No sksl asset found.
F Thread:547643967880 [FATAL:flutter/shell/common/shell.cc(836)] Check failed: task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread().
E FML KILL PROCESS
E Thread:548316182544 [ERROR:flutter/shell/platform/ohos/napi/platform_view_ohos_napi.cpp(229)] nativeInvokePlatformMessageResponseCallback GetArrayBuffer error -99
E Thread:548316182544 [ERROR:flutter/shell/platform/ohos/napi/platform_view_ohos_napi.cpp(234)] nativeInvokePlatformMessageResponseCallback message null
不过现在又遇到另一个问题:运行单测 flutter test
时,提示找不到 bin/cache/artifacts/engine/darwin-x64/flutter_tester
。fldoc 可以看到下载路径是 ,下载解压确实没找到 flutter_test 文件,而在官方的 3.22 版本包里是有这文件的。
登录 后才可以发表评论