鸿蒙北向应用开发: 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.

相关推荐
坚果派·白晓明21 天前
C/C++三方库鸿蒙化不是事,看这一篇就够了,以cpp-ipc三方库鸿蒙化为例带你成为贡献者
c语言·开发语言·c++·harmonyos·开源鸿蒙
●VON1 个月前
React Native for OpenHarmony:猜数字游戏完整技术实现文档
学习·react native·react.js·游戏·开源鸿蒙·von
向哆哆1 个月前
Flutter × OpenHarmony 跨端开发:高校四六级报名管理系统中的“常见问题”模块实现解析
flutter·开源·鸿蒙·openharmony·开源鸿蒙
向哆哆1 个月前
Flutter × OpenHarmony 跨端实战:打造健身俱乐部「数据可视化仪表盘」模块
flutter·信息可视化·开源·鸿蒙·openharmony·开源鸿蒙
向哆哆1 个月前
打造高校四六级报名管理系统:基于 Flutter × OpenHarmony 的跨端开发实践
flutter·开源·鸿蒙·openharmony·开源鸿蒙
向哆哆1 个月前
构建跨端健身俱乐部管理系统:Flutter × OpenHarmony 的数据结构与设计解析
数据结构·flutter·鸿蒙·openharmony·开源鸿蒙
向哆哆1 个月前
高校四六级报名管理系统的考试信息模块实现:Flutter × OpenHarmony 跨端开发实践
flutter·开源·鸿蒙·openharmony·开源鸿蒙
向哆哆1 个月前
高校四六级报名系统通知公告模块实战:基于 Flutter × OpenHarmony 跨端开发
flutter·开源·鸿蒙·openharmony·开源鸿蒙
向哆哆1 个月前
构建健康档案管理系统:Flutter × OpenHarmony 跨端实现就医记录展示
flutter·开源·鸿蒙·openharmony·开源鸿蒙
向哆哆1 个月前
画栈 · 跨端画师接稿平台:基于 Flutter × OpenHarmony 的整体设计与数据结构解析
数据结构·flutter·开源·鸿蒙·openharmony·开源鸿蒙