ITPub博客

首页 > 应用开发 > IT综合 > OpenHarmony4.1Release无法运行debug应用问题分析

OpenHarmony4.1Release无法运行debug应用问题分析

IT综合 作者:LAVAL社区小助手 时间:2024-03-27 14:41:48 0 删除 编辑

1 关键字

debug; 4.1Release; 应用;

2 开发环境

系统版本: 4.1-Release

DevEco Studio版本: 4.0 Release (build:4.0.0.600)

SDK版本: 4.0.10.13(及以上)

设备型号: 开发者手机

3 问题描述

在适配开发者手机4.1Release应用过程中,发现 分发中心能成功安装,但是无法正常启动。

4 问题原因

开发者手机4.1Release版本系统参数 const. security. developermode. state为空,而解压分发中心hap时发现其 module. json的 debug配置为 true

{    "app": {
        ···        "debug": true,
        ···
    },
}

5 解决方案

方案一 应用层解决

编译构建分发中心时,IDE的 Build  Mode改为 release(默认为 < None>)。

方案二 设备层解决

在设备shell空间里执行

param set const.security.developermode.state 1

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/70033059/viewspace-3010622/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
https://laval.csdn.net/

注册时间:2023-08-22

  • 博文量
    11
  • 访问量
    8149