harmony OS 开发工具安装

安装流程

  • 安装完成

初始配置

  • 双击打开

  • Running DevEco Studio requires the npm configuration information. You can modify the NPM Registry for an enhanced experience when downloading the npm dependencies.
    The configuration information is written to the C:/Users/ASUS/.npmrc file.
    Npm registry https://repo.huaweicloud.com/repository/npm/
    运行DevEco Studio需要npm配置信息。在下载NPM依赖项时,你可以修改NPM注册表以获得更好的体验。
    配置信息写入“C:/Users/ASUS/”。npmrc文件。
    Npm注册https://repo.huaweicloud.com/repository/npm/
  • 安装成功检查,点击configure,选择setting,输入SDK搜索,确保Java导入成功!!

基本配置

  • 修改主题

    • file---->setting,设置如下

  • 设置字体大小

  • 取消注释体并修改注释颜色

  • 自动导入包(设置完成,开发工具将帮我们自动导入包)

  • 提示忽略大小写

  • 修改自动提示的快捷键

启动程序HelloWolrd

  • 登入华为‘账号

    • 点击右上角人物图标

  • 选择模拟器

  • 启动成功

可能出现的问题

在HarmonyOS DevEco Studio下出现SDK无法下载js的情况,该如何解决?

问题描述:

根据HarmonyOS官方文档集成IDE成功后,下载SDK时遇到无法下载js,提示npm(node)安装失败等信息:

Error: : Install failed.  Error: : Install js dependencies failed. Unable to run 'npm install'. Js install ation failed. See https://developer.harmonyos.com/cn/docs/documentation/doc-guid es/environment_config-0000001052902427#ZH-CN_TOPIC_0000001154865731

注:安装js依赖项失败,无法运行“npm install”,Js安装失败。

解决方法

1.安装nodejs,官网下载:https://nodejs.org/zh-cn/download/

2.将DevEco Studio 自带的node替换为本地安装的node(自己从官网下载的nodejs),进入IDE软件,打开Setting(file---->setting),设置如下图:

3.在设置的快速搜索框内输入node,修改DevEco Studio自带的node,修改为自己下载的nodejs安装位置,如下图:

4.修改完成就可以下载SDK的js,输入SDK,勾选js,然后点击apply下载!

开始页面Tips

You can inject SQL into a string literal (Alt+Enter | Inject language or reference | <SQL dialect>) and then use coding assistance for SQL.
可以将SQL注入字符串文本(Alt+Enter | inject language or reference | <SQL dialect>),然后使用SQL的编码帮助。
DevEco Studio allows you to debug your app written in multiple languages. In a JS project or C/C++ project, you can select the Java+JS or Java+C debug type. Before debugging a hybrid project, set the debug type to Dual(Js + Java) or Detect Automatically. For a C/C++ project, set the debug type to Dual(Java + Native) or Detect Automatically.
DevEco Studio允许您调试用多种语言编写的应用程序。在JS项目或C/C++项目中,可以选择Java+JS或Java+C调试类型。调试混合项目之前,请将调试类型设置为Dual(Js+Java)或自动检测。对于C/C++项目,将调试类型设置为Dual(Java+Native)或自动检测。
Enable or disable JS postfix code completion from Settings > Editor > General > Postfix Templates. The following figure shows the supported types of postfix code completion.
从设置>编辑器>常规>后缀模板启用或禁用JS后缀代码完成。下图显示了支持的后缀代码完成类型。
If a device in a project has multiple modules and the modules are invoked by each other, you need to install the .hap packages of multiple modules on the device in the debug phase. In this case, select Deploy Multi Hap Package in the settings of the module to be debugged.
如果项目中的一个设备具有多个模块,并且这些模块相互调用,则需要在调试阶段在该设备上安装多个模块的.hap包。在这种情况下,请在要调试的模块的设置中选择Deploy Multi-Hap Package。
DevEco Studio supports Java code obfuscation. You can manually set proguardEnabled in the build.gradle file of the module to true to enable the function.
devecostudio支持Java代码模糊处理。您可以在模块的build.gradle文件中将proguardEnabled手动设置为true以启用该功能。
When compiling code, you can use the previewer to view the UI layout. The XML, Java, JS, CSS, and HML files can be previewed. You can open the previewer in any of the following ways:
On the menu bar, go to View > Tool Windows > Previewer.
Click the Previewer tab on the right side.
Press Alt+3.
编译代码时,可以使用预览器查看UI布局。可以预览XML、Java、JS、CSS和HML文件。您可以通过以下任一方式打开预览器:
在菜单栏上,转至“视图>工具窗口>预览器”。
单击右侧的“预览器”选项卡。
按Alt+3。
  • 格式化代码

The editor allows you to format the code in a specified range or the entire file, dramatically improving the readability of code.
To format code in a specified range, press Ctrl+Alt+L (Command+Option+L on macOS).
To format code in the current file, press Ctrl+Alt+Shift+L (Command+Option+L on macOS).
编辑器允许您在指定范围或整个文件中格式化代码,从而显著提高代码的可读性。
要在指定范围内格式化代码,请按Ctrl+Alt+L(macOS上的Command+Option+L)。
要格式化当前文件中的代码,请按Ctrl+Alt+Shift+L(macOS上的Command+Option+L)。
To reinstall the app in the debugging phase while retaining the app data on the device, select the overwrite mode. Method:
Go to Run > Edit Configurations, set the .hap package installation mode for the specified module, and select Replace existing application.
要在调试阶段重新安装应用程序,同时在设备上保留应用程序数据,请选择覆盖模式。方法:
转到运行>编辑配置,为指定模块设置.hap软件包安装模式,然后选择替换现有应用程序。
Move the cursor to a field such as the class, method, parameter, or variable to view the corresponding notes. You can also click a field and press Ctrl+Q to view the notes.
将光标移动到类、方法、参数或变量等字段以查看相应的注释。也可以单击某个字段并按Ctrl+Q键查看注释。
  • 直接修改样式

The previewer supports the XML layout and JS bidirectional preview function. You can click the   icon on the preview page to enable bidirectional preview.
Enabling bidirectional preview allows coordination between the code editor, UI, and component tree. You can also modify styles on the preview page.
预览器支持XML布局和JS双向预览功能。您可以单击预览页面上的图标以启用双向预览。
启用双向预览允许在代码编辑器、UI和组件树之间进行协调。也可以在预览页面上修改样式。
DevEco Studio provides the following module types (moduleType): Entry, Feature, and Har, and only the Entry and Feature modules support online running and debugging.
devecostudio提供以下模块类型(moduleType):Entry、Feature和Har,只有Entry和Feature模块支持在线运行和调试。
  • 配置多项目预览

The previewer supports cross-device preview, that is, you can preview the UI layout of a project on multiple devices at the same time.
You need to manually set the supported devices in the config.json file.
After you complete the setting, restart the previewer. On the preview page, click Multi-device preview to preview the UI layout on the devices. 预览器支持跨设备预览,即可以同时在多个设备上预览项目的UI布局。
您需要在config.json文件中手动设置支持的设备。
完成设置后,重新启动预览程序。在预览页面上,单击多设备预览以预览设备上的UI布局。

总结

harmony OS 开发工具安装的更多相关文章

  1. Harmony OS 开发避坑指南——DevEco Device Tool 安装配置

    Harmony OS 开发指南--DevEco Device Tool 安装配置 本文介绍如何在Windows主机上安装DevEco Device Tool工具. 坑点总结: 国内部分网络环境下,安装 ...

  2. Harmony OS 开发避坑指南——源码下载和编译

    Harmony OS 开发避坑指南--源码下载和编译 本文介绍了如何下载鸿蒙系统源码,如何一次性配置可以编译三个目标平台(Hi3516,Hi3518和Hi3861)的编译环境,以及如何将源码编译为三个 ...

  3. Java开发工具安装步骤内容如下

    Java开发工具安装步骤内容如下 安装 开发工具 STS 链接下载网址 eclipse 链接下载网址 JDK安装 jdk链接下载地址 Marven环境 marven链接下载地址 Tomcat tomc ...

  4. Linux (Ubuntu12.04) 下开发工具安装和使用

    Linux (Ubuntu12.04) 下开发工具安装和使用 这里讲述的是关于在ubuntu12.04下面安装和使用各种IDE 开发环境和初步使用的知识.说一下背景:很多的开发基本都是在linux操作 ...

  5. go安装和开发工具安装

    go适合做什么 l 服务端开发 l 分布式系统 l 网络编程 l 区块链开发 l 内存KV数据库,例如boltDB.levelDB l 云平台 一 go安装 官网:https://golang.goo ...

  6. idea开发工具安装说明

    开发工具安装说明   安装JDK1.8 第一步,双击"jdk-8u45-windows-i586.exe"安装文件,进行安装,具体安装过程如下图所示: 第二步,右键我的电脑-属性- ...

  7. OpenDaylight开发hello-world项目之开发工具安装

    OpenDaylight开发hello-world项目之开发环境搭建 OpenDaylight开发hello-world项目之开发工具安装 OpenDaylight开发hello-world项目之代码 ...

  8. Mac005--VS&webstorm前端开发工具安装

    Mac--Visual studio Code工具安装(企业常用) 安装网址:https://code.visualstudio.com/download 设置格式: 1.配置工作区与终端字体大小 常 ...

  9. 1-1.go开发工具安装

    (1) (2) bin:go的可执行文件 src:go的源代码 (3)安装开发工具 安装:goland-2018.1.1.exe 将.jar文件复制到工具的bin目录下   用记事本打开“goland ...

随机推荐

  1. Nginx配置文件详解与优化建议

    1.概述 今天来详解一下Nginx的配置文件,以及给出一些配置建议,希望能对大家有所帮助. 2.nginx.conf 1)配置文件位置 nginx 安装目录的 conf 文件夹下,例如:/usr/lo ...

  2. seo高手教你seo优化排名该怎么做

    seo高手教你seo优化排名该怎么做 第一节:如何在本地搭建服务器环境 本节课程主要是讲如何利用 Xampp在本地搭建服务器环境 .网站使用asp和php比较常见,当然,就目前而言,使用php搭建网站 ...

  3. 面试官:如何实现LRU?你学会了吗?

    面试官:来了,老弟,LRU缓存实现一下? 我:直接LinkedHashMap就好了. 面试官:不要用现有的实现,自己实现一个. 我:..... 面试官:回去等消息吧.... 大家好,我是程序员学长,今 ...

  4. client-go实战之五:DiscoveryClient

    欢迎访问我的GitHub https://github.com/zq2599/blog_demos 内容:所有原创文章分类汇总及配套源码,涉及Java.Docker.Kubernetes.DevOPS ...

  5. vue-过滤器(filter)的使用详解

    前言 Vue 允许我们在项目中定义过滤器对我们页面的文本展示进行格式的控制,本文就来总结一下过滤器在项目中的常见使用方法. 正文 1.局部过滤器的注册 (1)无参局部过滤器 <div id=&q ...

  6. IKEv1协商安全联盟的过程

    IKEv1协商安全联盟的过程 采用IKEv1协商安全联盟主要分为两个阶段: 第一阶段,通信双方协商和建立IKE协议本身使用的安全通道,即建立一个IKE SA: 第二阶段,利用第一阶段已通过认证和安全保 ...

  7. JS003. 事件监听和监听滚动条的三种参数( addEventListener( ) )

    全局 1 window.addEventListener('scroll', () => { 2 console.log('------') 3 console.log(document.doc ...

  8. 机器学习——EM算法

    1 数学基础 在实际中,最小化的函数有几个极值,所以最优化算法得出的极值不确实是否为全局的极值,对于一些特殊的函数,凸函数与凹函数,任何局部极值也是全局极致,因此如果目标函数是凸的或凹的,那么优化算法 ...

  9. 学习PHP中国际化地数字格式处理

    不知道大家有没有了解过,对于数字格式来说,西方国家会以三位为一个进位,使用逗号来分隔.比如,12345678,用标准的格式来表示的话就是 12,345,678 .不过我们中文其实并不会有这样的分隔符, ...

  10. 【PHP数据结构】图的应用:最小生成树

    在学习了图的基本结构和遍历方式后,我们再继续地深入学习一些图的基本应用.在之前的数据结构中,我们并没接触太多的应用场景,但是图的这两类应用确是面试或考试中经常出现的问题,而且出现的频率还非常高,不得不 ...