harmony flutter: install parse native so failed.

Install Failed: error: failed to install bundle.

code:9568347

error: install parse native so failed.

In the module named entry, the Abi type supported by the device does not match the Abi type configured in the C++ project.

根据官方的修复方式无法解决问题,这个问题疑似使用最新的模拟器才出现,根据ChatGPT的方案。运行模拟器后,查看设备列表:

bash 复制代码
flutter devices
# 如果使用fvm
fvm flutter devices

可能输出:

text 复制代码
127.0.0.1:5555 (mobile) • 127.0.0.1:5555 • ohos-x64       • Ohos OpenHarmony-6.0.1.112 (API 21)
Windows (desktop)       • windows        • windows-x64    • Microsoft Windows [版本 10.0.26100.7171]
Chrome (web)            • chrome         • web-javascript • Google Chrome 143.0.7499.40
Edge (web)              • edge           • web-javascript • Microsoft Edge 143.0.3650.66

然后在cmdPower Shell使用命令flutter run -d <deviceId>,按照上述是:

bash 复制代码
flutter run -d 127.0.0.1:5555

使用官方的排查方式(无效)

使用Huawei/DevEco Studio/sdk/default/openharmony/toolchains/hdc.exe查询了版本,到此目录下运行:

···bash

$ ./hdc shell

$ param get const.product.cpu.abilist

x86_64

···

并在XXX\ohos\entry\build-profile.json5中配置了abiFilters,依然无效:

json 复制代码
{
  "apiType": 'stageMode',
  "buildOption": {
    "externalNativeOptions": {
      "abiFilters": ["x86_64", "arm64-v8a"]
    }
  },
  "targets": [
    {
      "name": "default",
      "runtimeOS": "HarmonyOS"
    },
    {
      "name": "ohosTest",
    }
  ]
}

自有ChatGPT以来很少这样排查问题并做笔记了~

相关推荐
浮江雾3 小时前
Flutter第四节------核心概念学习笔记:从基础语法到异步编程
linux·服务器·开发语言·笔记·flutter·入门·基础
心中有国也有家4 小时前
AtomGit Flutter 鸿蒙客户端:Flutter 鸿蒙应用的错误处理与优雅降级策略
学习·flutter·华为·harmonyos
心中有国也有家16 小时前
AtomGit Flutter 鸿蒙客户端: ChangeNotifier 模式
学习·flutter·华为·harmonyos
浮江雾1 天前
Flutter第三节----Dart中的数据类型
android·开发语言·学习·flutter·入门·函数
又菜又爱coding1 天前
Flutter Android 无线调试No supported devices connected
flutter
心中有国也有家1 天前
AtomGit Flutter 鸿蒙客户端:初始化流水线
学习·flutter·华为·harmonyos
ZZZMMM.zip2 天前
基于鸿蒙HarmonyOS NEXT开发AI英语口语应用:智能口语练习新体验与鸿蒙Flutter框架跨端实
人工智能·flutter·华为·harmonyos·鸿蒙·鸿蒙系统
心中有国也有家2 天前
AtomGit Flutter 鸿蒙客户端:白噪音场景的视觉设计
学习·flutter·华为·harmonyos
心中有国也有家2 天前
AtomGit Flutter 鸿蒙客户端:呼吸练习的完整生命周期
学习·flutter·华为·harmonyos
心中有国也有家2 天前
AtomGit Flutter 鸿蒙客户端:呼吸球动画
学习·flutter·华为·harmonyos