当前位置:网站首页>Openharmony notes ----------- (I)
Openharmony notes ----------- (I)
2022-06-13 07:45:00 【Maruko_ four hundred and twenty-eight】
1.DevEco Studio Development environment construction
JavaScript Project development depends on Node.js Environmental Science , Download link :
Special for Hongmeng system IDE development environment 「 DevEco Studio 」, Download link :
HUAWEI DevEco Studio and SDK Download and upgrade | HarmonyOS developer
2.Hello Word Application experience
First step : After the application starts , Prompts whether to create a starter script , Convenient for subsequent template selection .
The second step : Use Huawei cloud npm Package management tools .
The third step : establish or Import the project .
Step four : Select project type and template .
In order to meet the development needs of applications running on multiple devices ,DevEco Studio 2.1 Release On the basis of the original single equipment engineering template , Added 11 A cross equipment engineering template . According to the project guide , Select the template and equipment type in turn , Easily create cross device engineering , Automatically generate sample code and related resources .
Step five : Create an engineering project .
Step six : Check and close development tips .
Step seven : The project automatically downloads the corresponding dependencies and files , In this step, if you click run directly, there will be an error prompt .
Step eight : stay DevEco Studio menu bar , Click on Tools > SDK Manager Configure the corresponding SDK edition .
Step nine : Click on the top right corner sign in Log in to Huawei account , Please enter the user name and password of Huawei account with real name authentication to login , After successful login in the web page , Complete authorization .
Step 10 : Enter into src/main/js/default/pages/index page , open view -> Tool Windows -> Previewer To preview .
Step 11 : Get into Tools -> Devices Manager See the simulator management page , In this step, you must log in to a Huawei account with real name authentication , You can select the corresponding device , Then start the device .
The twelfth step : After starting the device , Click again on the Green operation button , You can run the project on the simulation device .
ps: stay Views You can quickly set the editor theme , And corresponding development settings
3.JS Module development directory
The files in the directory structure are classified as follows :
- .hml At the end of the HML Template file , This file is used to describe the file layout structure of the current page .
- .css At the end of the CSS The style file , This file is used to describe the page style .
- .js At the end of the JS file , This file is used to handle the interaction between the page and the user .
The role of each folder :
- app.js Files are used for global JavaScript Logic and application lifecycle management .
- pages The directory is used to store all component pages .
- common Directory is used to store public resource files , such as : Media resources and JS file .
- i18n The directory is used to configure the content of resources in different language scenes , such as : Apply text entry , Path... Pictures, etc , Be careful i18n Is the development retention folder , Cannot rename .
4. Components
Hongmeng JS API Provides a complete introduction to , Let's check the official documents for details : Components - The official introduction
边栏推荐
- Consistency under distributed
- Redis learning journey -- subscription and publishing
- 思路清晰的软光栅小引擎和四元数结合案例
- 获取类的属性
- Questions about ETL: io trino. jdbc. TrinoDriver
- B. I hate 1111 (mnemonic search number theory
- Paper notes: multi label learning bp-mll
- udf_ interval_ to_ Hourno() function
- MySQL table partitioning
- Upgrade the project of log4j to log4j2
猜你喜欢
A learning dog
2022 electrician (elementary) examination questions and simulation examination
First graphical interface
AQS - detailed explanation of reentrantlock source code
Redis learning journey - cache exceptions (CACHE penetration, cache avalanche, cache breakdown)
Paper notes: multi label learning bp-mll
2021-10-08
Index push down (ICP) for mysql5.6
Mui mixed development - when updating the download app, the system status bar displays the download progress
25 | 冒险和预测(四):今天下雨了,明天还会下雨么?
随机推荐
[pytorch] pytorch0.4.0 installation tutorial and GPU configuration collection (including test code)
26 | superscalar and VLIW: how to make the CPU throughput exceed 1
QT reading SQLSERVER database
21 | 面向流水线的指令设计(下):奔腾4是怎么失败的?
redis面试题
Hashtable source code analysis
【Emgu.CV】Emgu.CV.Example\OCR运行报错System.IO.FileNotFoundException:“未能加载文件或程序集“System.Drawing.Common
Nodejs file module FS
Questions about ETL: io trino. jdbc. TrinoDriver
Clickhouse column basic data type description
Tidb source code series: immersive compilation of tidb
Adding certificates to different systems
24 | 冒险和预测(三):CPU里的“线程池”
Simple use of logs
C language: how to give an alias to a global variable?
v-for生成的子组件列表删除第n行出现数据错乱问题
平衡二叉树学习笔记------一二熊猫
OpenHarmony笔记-----------(一)
21 | pipeline oriented instruction design (Part 2): How did Pentium 4 fail?
Redis Cluster - the bottom principle of building clusters