当前位置: 首页 > ai >正文

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

http://www.xdnf.cn/news/5744.html

相关文章:

  • django扩展练习记录
  • 一文详解Spring Boot如何配置日志
  • 第一章 应急响应-webshell查杀
  • 【免杀】C2免杀技术(一)VS设置
  • 逆向破解:x64dbg
  • 操作系统实战——QEMU模拟器搭建【rCore 操作系统】
  • 多线程访问Servlet如何谨慎处理共享资源
  • 5.10-套接字通信 - C++
  • Spring急速入门
  • Linux系统管理与编程18:自动化部署dhcp服务
  • QML状态机制示例(State)
  • 数据知识产权质押融资风险控制
  • 前端面试每日三题 - Day 31
  • 环境扫描电镜对含水样品的观察技术与方法
  • Yolov8数据增强配置
  • 聊一聊AI对接口测试的潜在影响有哪些?
  • 【Mysql基础】一、基础入门和常见SQL语句
  • Service Mesh实战之Istio
  • 12.2.2 allocator类
  • CMake 命令行参数全解析(2025年更新版)
  • Clang实现C++文件分析,含Python实战
  • 使用webservice生成节假日/双休日/工作日信息
  • 蚁群算法赋能生鲜配送:MATLAB 实现多约束路径优化
  • PowerBI基础
  • bunsenlabs系统详解
  • java 中 DTO 和 VO 的核心区别
  • 基于SpringBoot的校园周边美食探索及分享平台【附源码+数据库+文档下载】
  • JSON 实体属性映射的最佳实践
  • 人脸识别的应用场景变化
  • 牛客周赛 Round 92