OpenHarmony开源社区
直播中

jf_51331055

未满1年用户 29经验值
擅长:开源鸿蒙
私信 关注

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

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.jsondebug配置为true

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

5 解决方案

方案一 应用层解决

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

方案二 设备层解决

在设备shell空间里执行

param set const.security.developermode.state 1

水印试下_副本.png

更多回帖

发帖
×
20
完善资料,
赚取积分