OpenHarmony开发者论坛

标题: OpenHarmony Full SDK的安装 [打印本页]

作者: 润开鸿_贾佳豪    时间: 2023-12-5 18:33
标题: OpenHarmony Full SDK的安装
[md]OpenHarmony的应用开发工具HUAWEI DevEco Studio现在随着OpenHarmony版本发布而发布,只能在版本发布说明中下载,例如[OpenHarmony 4.0 Release](https://gitee.com/openharmony/do ... 7%E5%85%B3%E7%B3%BB)

- 文章写作环境:
  - [OpenHarmony 4.0 Release](https://gitee.com/openharmony/do ... F%E6%80%BB%E7%BA%BF)
  - [DevEco Studio 4.0 Release](https://contentcenter-vali-drcn. ... EF15DDB3E1F79DA435A)

### full sdk的安装教程

1.通过DevEco Studio下载好nodejs,配置npm为全局变量

![image.png](https://dl-harmonyos.51cto.com/i ... rocess=image/resize,w_820,h_1079)

2.fullsdk可以从[OpenHarmony数字协作平台](http://ci.openharmony.cn/workbench/cicd/dailybuild/dailyList)获取,首先选择 `分支`,然后点击 `滚动构建`
![屏幕截图 20231205 181330.png](https://dl-harmonyos.51cto.com/i ... rocess=image/resize,w_820,h_1541)

- 注意:fullsdk从[OpenHarmony的版本发布说明](https://gitee.com/openharmony/do ... 9%E8%8E%B7%E5%8F%96)或者openHarmony SDK [官方发布渠道](https://gitee.com/openharmony-si ... -Testing-Version.md) 中是下载不了的。

3.下载好后,分别解压出 `ets` `js` `native` `previewer` `toolchains` ,把它们一起放在DevEco Studio中设置的sdk目录下(注意上一级目录要为数字,如果是要替换api9,这个数字就是9。如果要替换api10,这个数字就是10)
![屏幕截图 20230925 195207.png](https://dl-harmonyos.51cto.com/i ... rocess=image/resize,w_820,h_731)

- 注意选择解压时选择 `提取到当前位置`
  ![image.png](https://dl-harmonyos.51cto.com/i ... rocess=image/resize,w_820,h_603)

4.打开DevEco Studio,找到当前DevEco Studio中默认安装的sdk版本号,
![屏幕截图 20231205 182135.png](https://dl-harmonyos.51cto.com/i ... rocess=image/resize,w_820,h_751)

将full sdk中解压出来的 `ets` `js` `native` `previewer` `toolchains`文件下的oh-uni-package.json文件的版本修改为DevEco Studio中默认安装的sdk版本号
![image.png](https://dl-harmonyos.51cto.com/i ... rocess=image/resize,w_785,h_458)

5.再到ets\build-tools\ets-loader目录中打开cmd/powerShell窗口,输入命令 `npm install`下载node_modules依赖包。出现一些warning是正常的

![image.png](https://dl-harmonyos.51cto.com/i ... rocess=image/resize,w_820,h_666)
[/md]




欢迎光临 OpenHarmony开发者论坛 (https://forums.openharmony.cn/) Powered by Discuz! X3.5