鸿蒙入门到实战开发 - DevEco Studio 开发工具

HUAWEI DevEco Studio 基于IntelliJ IDEA Community开源版本定制开发,支持HarmonyOS和OpenHarmony应用及服务开发。

面向全场景多设备,提供一站式的分布式应用开发平台,支持分布式多端开发、分布式多端调测、多端模拟仿真,全方位的质量与安全保障。

DevEco Studio 3.1配套支持HarmonyOS 3.1版本及以上的应用及服务开发,提供了代码智能编辑、低代码开发、双向预览等功能,以及轻量构建工具DevEco Hvigor 、本地模拟器,持续提升应用及服务开发效率。

developer.harmonyos.com/cn/develop/...

下载安装完事遇到这么一个问题

ruby 复制代码
Unable to run 'npm install'.
	 Detail: See https://developer.harmonyos.com/en/docs/documentation/doc-guides/faq-development-environment-0000001168829643#section1311117111474
> hvigor ERROR: Sdk download failed.
> hvigor ERROR: BUILD FAILED in 9 s 401 ms 

刚上来创建一个项目

项目结构

安装文档执行这一步也失败了。。。

ruby 复制代码
Install task failed: JS 3.2.12.5.
Install JS dependencies failed.
Cause: Unable to run npm install.
Solution: See https://developer.harmonyos.com/cn/docs/documentation/doc-guides/faq-development-environment-0000001168829643#section1311117111474

文档说需要来这里清缓存,我打开后发现没有缓存但是也装模作样的清了一下

看到这些就是可以了

shell 复制代码
> hvigor 'npm install' executed
> hvigor Moving the SDK...
> hvigor Install task finished: ArkTS 3.2.12.5
> hvigor Installing Toolchains:3.2.3.6...
> hvigor Install task started: Toolchains 3.2.3.6
> hvigor Downloading https://update.dbankcdn.com/download/data/pub_13/HWHOTA_hota_900_9/cd/v3/6-Eg0KmCSpOpkqSEm-c8_w/toolchains-darwin-arm64-3.2.3.6-Release.zip...
> hvigor Unzipping /Users/xxx/Library/Huawei/Sdk/.temp/toolchains/3.2.3.6/install/toolchains-darwin-arm64-3.2.3.6-Release.zip...
> hvigor Moving the SDK...
> hvigor Install task finished: Toolchains 3.2.3.6
> hvigor Finished :entry:init... after 2 ms 
> hvigor Finished ::init... after 1 ms 

Process finished with exit code 0

运行App

lua 复制代码
The type of the target device does not match the deviceType configured in the module.json5 file of the selected module.

查了几个文档依然没有解决问题,好挫败啊

developer.huawei.com/consumer/cn...

blog.csdn.net/Calvin_zhou...

developer.huawei.com/consumer/cn...

我心想是不是没有模拟器、打算去下载一个模拟器,然后提示我需要先下载系统,玩呢?

然后我把这一堆都下载了

然后就安装了这个

可是我还么有运行起来程序,我累了。。。

相关推荐
世人万千丶5 小时前
鸿蒙日志体系高级应用:HiLog分级输出/隐私脱敏/远程日志采集/线上问题精准溯源方案
学习·harmonyos·鸿蒙
程序员黑豆12 小时前
鸿蒙应用开发:AttributeModifier 使用教程
前端·harmonyos
HarmonyOS_SDK12 小时前
基于人体骨骼点识别与跟踪,实现低时延体感游戏
harmonyos
世人万千丶13 小时前
鸿蒙Crash高级捕获与异常监控:全局异常兜底/崩溃栈解析/符号表还原/智能聚类/闭环修复
学习·机器学习·华为·数据挖掘·harmonyos·鸿蒙·聚类
云端漫步198715 小时前
HarmonyOS NEXT AI 智能生活助手:创建企业级 AI 工程与目录结构
人工智能·生活·harmonyos
程序员黑豆18 小时前
鸿蒙应用开发 @Extend 装饰器使用教程
前端·harmonyos
超爱西西鸭18 小时前
鸿蒙大型项目高级模块化拆分:高内聚低耦合架构设计/HSP动态交付/接口契约/依赖倒置落地规范
学习·华为·harmonyos·鸿蒙
云端漫步198718 小时前
HarmonyOS NEXT AI 智能生活助手:PromptManager 设计与实现
人工智能·生活·harmonyos
yuanlaile20 小时前
Flutter 开发鸿蒙 App 踩坑总结,一套完整实战学习方案分享
flutter·harmonyos·flutter开发鸿蒙·flutter开发鸿蒙实战·flutter ai实战·鸿蒙 ai实战