> 技术文档 > 【鸿蒙上架填坑之路】_the build configuration of the current build mode

【鸿蒙上架填坑之路】_the build configuration of the current build mode


1. 通过DevEco-Studio中的Build -> Upload Product的时候,提示:The build configuration of the current Build Mode cannot be uploaded. Modify the build configuration of Build Mode and upload it again.

【鸿蒙上架填坑之路】_the build configuration of the current build mode
意思是:无法上传当前生成模式的生成配置。修改构建模式的构建配置,然后重新上传。

没有写明具体是哪里的配置问题,首先我查看了包名是否一致、证书是否有问题,甚至App名称都核实了,没有发现问题。有怀疑过上传时,签名选择的是否正确,然后将default的签名改成了online的,但依然不能解决问题。

最后求助于鸿蒙社区的贴子,然后看到了这个,尝试了一下解决了。灵感来自: 使用DevEco Studio新建demo项目…,感谢!

具体解决方法:将“Product”的“Build Mode”改成正确的构建模式,例如我准备上线,选择了release模式。
具体操作:

a.在编辑器右上角找到这个图标,鼠标放上去时,显示“Product”,就是它了。
【鸿蒙上架填坑之路】_the build configuration of the current build mode
b.然后轻轻点击一下,就会出现下面的弹窗,选择Build Mode为你当前需要的模式,我是上线,选择了release别忘了右下角点击Apply。然后你再重新“Upload Product”,就不会出现哪个错误了。
【鸿蒙上架填坑之路】_the build configuration of the current build mode

其实是自己大意了,一开始问题的方向选错了。
提示中有关键字“Build Mode” 而非“build configuration”,并且这两个单词都是大写开头,已经是很明显了的。如果一开始就确定是“Build Mode” 错了,就能很快解决问题。

2.软件包上传后,提示“不通过(991)”

【鸿蒙上架填坑之路】_the build configuration of the current build mode
这个问题很奇葩,我是通过编辑器上传的包,这里竟然上传的是没有签名的包。

解决方法也很简单,先通过Build APP(s)打包,然后上传有签名的包到后台。

【鸿蒙上架填坑之路】_the build configuration of the current build mode
xxxx-signed.app为有签名的包.
【鸿蒙上架填坑之路】_the build configuration of the current build mode

官方解释:
错误码:991,表示:非法软件包
出现此错误,可能是软件包未签名,请检查编译环境,确认是否使用了签名文件。或者是否有进行拆包再手动打包,导致未正确签名。

3.安装HAP时提示“code:9568322 error: signature verification failed due to not trusted app source”

这个问题一般是签名中未包含该调试设备的UDID。调试时,建议使用自动签名。官方解释