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以来很少这样排查问题并做笔记了~

相关推荐
程序员老刘1 小时前
Dart Skills CLI 1.0发布,老刘年初的预言兑现了
flutter·ai编程·dart
天空之城--7 小时前
Flutter UI 绘制原理浅析
flutter
yume_sibai10 小时前
01-Flutter入门指南
flutter
lqj_本人21 小时前
Flutter 三方库「flutter_ble_peripheral」的鸿蒙化适配指南
flutter·华为·harmonyos
lqj_本人1 天前
Flutter 三方库「flutter-dualscreen」的鸿蒙化适配指南
flutter·华为·harmonyos
●VON1 天前
鸿蒙跨平台框架怎么选?从真实需求比较 Flutter、React Native、KMP/CMP 与 Web 路线
flutter·react native·harmonyos
lqj_本人1 天前
Flutter 三方库「flutter_displaymode」的鸿蒙化适配指南
flutter·华为·harmonyos
lqj_本人1 天前
Flutter 三方库「drag_and_drop_flutter」的鸿蒙化适配指南
flutter·华为·harmonyos
天空之城--1 天前
Flutter 三棵树:原理、机制与最佳实践
flutter
天空之城--1 天前
Flutter线程模型完全指南:从架构到实战
flutter·架构