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