BeforeMount
BeforeMount
  • 发布:2024-09-23 11:34
  • 更新:2024-09-23 16:05
  • 阅读:55

鸿蒙 msg:error: failed to install bundle. code:9568332 error: install sign info inconsistent.

分类:鸿蒙Next

m1 mac运行报错

11:31:51.050 打包成功
11:31:51.050 安装 .hap 到鸿蒙设备 ...
11:31:51.294 [Info]App install path:/Users/liuyonghe/Desktop/HelloDemo/os-harmony/unpackage/debug/app-harmony@1.3.7/entry/build/default/outputs/default/entry-default-unsigned.hap, queuesize:0, msg:error: failed to install bundle. code:9568332 error: install sign info inconsistent.
AppMod finish

11:31:51.295 安装失败

打钩 Automatically generate signature 运行后就会被取消

然后就还是这个错

2024-09-23 11:34 负责人:无 分享
已邀请:
DCloud_UNI_yuhe
  • BeforeMount (作者)

    4.25时候好用 我好像就看日志 28有鸿蒙的改动 升完就不好使了

    回退上个版本没反应

    想重下看网盘只有24和27

    2024-09-23 13:30

  • BeforeMount (作者)

    下了27

    14:01:00.535 安装 .hap 到鸿蒙设备 ...

    14:01:00.543 安装失败

    现在没有提示了 直接安装失败怎么解决

    2024-09-23 14:02

  • DCloud_UNI_yuhe

    回复 BeforeMount: 可以在鸿蒙devecostudio中,重写签名一下试试呢?

    2024-09-23 14:19

  • BeforeMount (作者)

    回复 BeforeMount:

    报错 运行所需的权限没有签名授权

    这是由于默认配置里面声明申请了一些权限,其中包含受限权限,这就要求安装包必须用具备足够权限授权的数字证书进行签名,否则无法安装到设备上。


    如果业务代码里面并没有实际使用到这些权限,一个简单的办法就是修改 harmony-configs/entry/src/main/module.json5 文件, 删除 module.requestPermissions 数组里面的这三项内容(因为它们是需要白名单授权的 ACL 权限),重新运行即可:


    ohos.permission.WRITE_IMAGEVIDEO

    ohos.permission.WRITE_CONTACTS

    ohos.permission.READ_PASTEBOARD

    如果确实需要这里的某些权限,那就需要申请一个调试证书,并配置到 harmony-configs/build-profile.json5 文件的 app.signingConfigs 中。 这里要注意,一定要通过 DevEco Studio 来申请这个证书,且需要开启 Automatically generate signature 选项,只有这样拿到的调试证书才会支持 ACL 权限。 手动申请的调试证书不会直接支持 ACL 权限,必须要获得白名单授权才可以,这个申请过程的门槛比较高。


    我先运行模拟器 就会报install sign info inconsistent.

    我不运行模拟器 就报运行所需的权限没有签名授权

    删除已安装app 关闭keep application data 都试过 都不行

    2024-09-24 15:39

1***@qq.com

1***@qq.com

我也是这个问题

  • DCloud_UNI_yuhe

    在devceo studio中点一下 file - project structure 中点击重新签名试一下呢?

    2024-09-23 16:10

  • 1***@qq.com

    回复 DCloud_UNI_yuhe: 试了,变成这个了:

    打包成功

    17:22:02.102 打包生成 .hap .......................

    17:22:09.255 > hvigor ERROR: Tools execution failed.

    09-23 17:22:08 ERROR - hap-sign-tool: error: Init keystore failed: parseAlgParameters failed: ObjectIdentifier() -- data isn't an object ID (tag = 48)



    • Try the following:

      > The key store file does not exist, please check the key store file path.

      > Incorrect keystore password, please input the correct plaintext password.

      > The keystore was created by a newer JDK version, please use the same JDK version

      Detail: Please check the message from tools.

      > More info: https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/ide-hvigor-faqs-0000001233028585-V5#section104639397814

      17:22:09.255 打包失败

    2024-09-23 17:24

  • DCloud_UNI_yuhe

    回复 1***@qq.com: 你对照华为给出的文档操作有效果吗?

    2024-09-23 17:52

  • 1***@qq.com

    回复 DCloud_UNI_yuhe: 没有

    2024-09-24 09:23

要回复问题请先登录注册