目录

鸿蒙模拟器运行NDK项目失败-9568347

鸿蒙模拟器运行NDK项目失败 9568347

鸿蒙编译NDK项目

模拟器运行NDK项目失败 9568347

23:32:17.572: $ hdc file send D:\study\hongmeng\MyTestNdk\entry\build\default\outputs\default\entry-default-unsigned.hap "data/local/tmp/9fff4611338a424bb31b521bdc3555af" in 30 ms
23:32:17.651: $ hdc shell bm install -p data/local/tmp/9fff4611338a424bb31b521bdc3555af  in 79 ms
Install Failed: error: failed to install bundle.
code:9568347
error: install parse native so failed.
View detailed instructions.
23:32:17.681: $ hdc shell rm -rf data/local/tmp/9fff4611338a424bb31b521bdc3555af
23:32:17.682: Launch com.example.testndk failed, starting handle failure progress
Error while Deploy Hap
  • 解决方法:

    在entry——>build-profile.json5中添加 abiFilters

{
  "apiType": "stageMode",
  "buildOption": {
    "externalNativeOptions": {
      "path": "./src/main/cpp/CMakeLists.txt",
      "arguments": "",
      "cppFlags": "",
      "abiFilters": [
        "arm64-v8a",
        "x86_64"
      ]
    }
  },

再次编译正常运行