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

相关推荐
时光慢煮38 分钟前
打造跨端博客分类与标签组件:Flutter × OpenHarmony 实战
flutter·开源·openharmony
zilikew9 小时前
Flutter框架跨平台鸿蒙开发——今日吃啥APP的开发流程
flutter·华为·harmonyos·鸿蒙
Whisper_Sy9 小时前
Flutter for OpenHarmony移动数据使用监管助手App实战 - 应用列表实现
android·开发语言·javascript·flutter·php
血色橄榄枝10 小时前
03 基于Flutter集成网络请求On OpenHarmony
网络·flutter
小风呼呼吹儿10 小时前
Flutter 框架跨平台鸿蒙开发 - 虚拟拼豆图纸查看应用开发教程
flutter·华为·harmonyos
IT陈图图11 小时前
Flutter × OpenHarmony 跨端实践:从零构建一个轻量级视频播放器
flutter·音视频·鸿蒙·openharmony
Miguo94well11 小时前
Flutter框架跨平台鸿蒙开发——戒拖延APP的开发流程
flutter·华为·harmonyos·鸿蒙
2601_9494800611 小时前
Flutter for OpenHarmony 音乐播放器App实战 - 主题设置实现
windows·flutter
小风呼呼吹儿12 小时前
Flutter 框架跨平台鸿蒙开发 - 虚拟红包雨应用开发教程
flutter·华为·harmonyos
2501_9445215915 小时前
Flutter for OpenHarmony 微动漫App实战:主题配置实现
android·开发语言·前端·javascript·flutter·ecmascript