鸿蒙北向应用开发: deveco5.0 创建开源鸿蒙项目

本地已经安装deveco5.0

使用5.0创建开源鸿蒙项目

文件->新建->新建项目

直接创建空项目,一路默认 next

直接编译项目

直接连接开源鸿蒙5.0开发板编译会提示

compatibleSdkVersion and releaseType of the app do not match the apiVersion and releaseType on the device.

应用程序的 SDK 版本或发布类型(releaseType)与设备上当前操作系统的版本不兼容

修改配置

查看项目级的build-profile.json5,可以看到当前默认的是鸿蒙配置,将这里修改为开源鸿蒙配置

将原来的

复制代码
"compatibleSdkVersion": "5.0.3(15)",
"runtimeOS": "HarmonyOS",
"buildOption": {
  "strictMode": {
    "caseSensitiveCheck": true,
    "useNormalizedOHMUrl": true
  }
}

修改为

复制代码
"compatibleSdkVersion": 14,
"compileSdkVersion": 14,
"targetSdkVersion": 14,
"runtimeOS": "OpenHarmony",
"buildOption": {
  "strictMode": {
    "caseSensitiveCheck": true,
    "useNormalizedOHMUrl": true
  }
}

点击立即同步

说明:

打开 文件->设置->OpenHarmony SDK

这里的14是sdk版本,需要跟你的板子烧录的镜像版本对应

再次编译运行项目

提示未签名

添加默认签名

再次编译运行签名后的项目

提示:

Install Failed: error: failed to install bundle.

code:9568332

error: install sign info inconsistent.

View detailed instructions.

You can also uninstall and reinstall the modules.

16:15:22.495: $ hdc shell rm -rf data/local/tmp/eeddc4203d4f49faba465a061b2d3f0d

16:15:22.496: Launch com.example.myapplication failed, starting handle failure progress

Error while Deploy Hap

卸载原来的安装并重新安装

直接点击uninstall and reinstall the modules.

相关推荐
M-Robots echo7 小时前
王成录:M-Robots 积木式架构,解决机器人软硬件重复开发难题
机器人·开源鸿蒙·开源社区·m-robots·王成录
nullregedit14 天前
OpenHarmony 小鸿 AI 开发实战 10:CI1302 语音上行的 UART 帧、Opus 与 VAD
openharmony·语音交互·开源鸿蒙·ws63·ci1302
nullregedit18 天前
OpenHarmony 小鸿 AI 开发实战 04:WS63 BurnTool 烧录、Loader、导出与回滚
openharmony·嵌入式开发·开源鸿蒙·ws63·burntool
nullregedit18 天前
OpenHarmony 小鸿 AI 开发实战 05:烧录成功仍黑屏的 GPIO14/PWR_ON 故障复盘
openharmony·gpio·故障排查·开源鸿蒙·ws63
nullregedit19 天前
OpenHarmony 小鸿 AI 开发实战 01:先认对工程,WS63 与 ESP32-P4 路径怎么选
openharmony·嵌入式开发·开源鸿蒙·esp32-p4·ws63
Industio_触觉智能1 个月前
开源鸿蒙OpenHarmony再进阶,OneConnect规范即将升级为国家级行业标准
嵌入式硬件·物联网·硬件架构·智能硬件·openharmony·开源鸿蒙
Industio_触觉智能2 个月前
瑞芯微RK3576落地智能农业新生态,鸿蒙农机平板应用场景拓展
嵌入式硬件·openharmony·开源鸿蒙·核心板·鸿蒙开发板·rk3576·农机平板
阿钱真强道2 个月前
29 鸿蒙LiteOS RK2206 Socket编程实战 UDP通信+LWIP原理全解析
udp·socket·鸿蒙·liteos·开源鸿蒙·瑞芯微·rk2206
阿钱真强道2 个月前
28 鸿蒙LiteOS RK2206 LwIP Raw API 实现无阻塞UDP双向通信
udp·harmonyos·鸿蒙·lwip·开源鸿蒙
阿钱真强道2 个月前
27 鸿蒙LiteOS RK2206 设备连路由器完整实战(配网+联网验证+网络连通性测试)
wifi·harmonyos·鸿蒙·rk·liteos·开源鸿蒙·瑞芯微