HarmonyOS 鸿蒙Next【新人求轻喷】报错install parse profile missing prop,无法将示例代码打包的hap安装到真机开发板上
HarmonyOS 鸿蒙Next【新人求轻喷】报错install parse profile missing prop,无法将示例代码打包的hap安装到真机开发板上 想用DevEco Studio将文档的示例项目签名打包成hap后安装到OpenHarmony开发板上,安装方式是直接在Studio的项目页面的右上角选择设备后点击运行,但是报错
报错信息见下
Install Failed: [Info]App install path:D:\Tmp\OHDemo2\entry\build\default\outputs\default\entry-default-signed.hap, queuesize:0, msg:error: failed to install bundle. error: install parse profile missing prop.
AppMod finish
Error while Deploy Hap
日志信息为:
01-15 22:03:24.934 1094-1380/? E C01120/BundleMgrService: [bundle_data_mgr.cpp(GetInnerBundleInfo):2210] can not find bundle com.example.myapplication
01-15 22:03:24.934 1094-1380/? E C01120/BundleMgrService: [base_bundle_installer.cpp(ProcessBundleUninstall):812] uninstall bundle info missing
01-15 22:03:24.934 1094-1380/? E C01120/BundleMgrService: [bundle_util.cpp(GetUserIdByUid):261] uid is illegal: -1
01-15 22:03:24.935 1094-1380/? E C01120/BundleMgrService: [status_receiver_proxy.cpp(CloseStreamInstaller):475] invalid installer id: 0
01-15 22:03:25.263 1094-1381/? E C01120/BundleMgrService: [json_util.h(GetValueIfFindKey):162] profile prop srcEntrance is mission
01-15 22:03:25.263 1094-1381/? E C01120/BundleMgrService: [module_profile.cpp(TransformTo):1985] parseResult is 8519886
01-15 22:03:25.263 1094-1381/? E C01120/BundleMgrService: [bundle_install_checker.cpp(ParseBundleInfo):476] parse bundle info failed, error: 8519886
01-15 22:03:25.263 1094-1381/? E C01120/BundleMgrService: [bundle_install_checker.cpp(ParseHapFiles):235] bundle parse failed 8519886
01-15 22:03:25.263 1094-1381/? E C01120/BundleMgrService: [base_bundle_installer.cpp(ParseHapFiles):2087] parse hap file failed due to errorCode : 8519886
01-15 22:03:25.263 1094-1381/? E C01120/BundleMgrService: [base_bundle_installer.cpp(ProcessBundleInstall):581] parse haps file failed 8519886
阅读了论坛上的相关帖子,在app.json5中添加了相关字段如下,但是报错依旧
"minAPIVersion": 9,
"targetAPIVersion": 9
代码在Studio的预览器上能正常显示,在HarmonyOS模拟器上能正常安装、运行
电脑上OpenHarmony API 9 的SDK版本为3.2.12.5 Release,开发板的系统版本为OprnHarmony 3.2.10.6
请问导致问题的原因是什么,该如何解决
更多关于HarmonyOS 鸿蒙Next【新人求轻喷】报错install parse profile missing prop,无法将示例代码打包的hap安装到真机开发板上的实战教程也可以访问 https://www.itying.com/category-93-b0.html
我是OpenHarmoy,使用api8-FA可以运行,API9-FA模式 Stage模式都不行,报错同样的问题,后来烧了厂商给的新固件就可以了
更多关于HarmonyOS 鸿蒙Next【新人求轻喷】报错install parse profile missing prop,无法将示例代码打包的hap安装到真机开发板上的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html
配置文件有问题,重新签名试试,build-profile.json5对应的文件要配置对才行
遇到同样的问题,我也是真机运行报这个错误,解决了吗
报错信息“install parse profile missing prop”通常与HAP包的配置文件(config.json或app.json)中缺少必要的属性有关。在HarmonyOS开发中,HAP包的配置文件需要包含一些必需的字段,如bundleName
、vendor
、version
等。如果这些字段缺失或格式不正确,系统在解析HAP包时会抛出该错误。
请检查你的HAP包配置文件,确保以下属性存在且格式正确:
bundleName
:应用的唯一标识符,需符合命名规范。vendor
:应用开发者名称。version
:应用的版本号,格式为major.minor.patch
。
此外,确保配置文件中的其他必要字段也已正确填写。如果问题仍然存在,可以尝试重新生成HAP包并再次安装。