当前位置:网站首页>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
边栏推荐
- udf_ interval_ to_ Hourno() function
- [Yu Yue education] econometrics reference materials of Jiujiang University
- 26 | superscalar and VLIW: how to make the CPU throughput exceed 1
- 25 | 冒险和预测(四):今天下雨了,明天还会下雨么?
- 20 | pipeline oriented instruction design (Part 1): Modern CPU with multi-purpose
- [MySQL] the most complete MySQL monitoring project
- First graphical interface
- 分布式系统之道:Lamport 逻辑时钟
- GCC compilation process, function library related compilation process
- v-for生成的子组件列表删除第n行出现数据错乱问题
猜你喜欢
Data desensitization tool advance tool Datamask
22 | adventure and prediction (I): hazard is both "danger" and "opportunity"
Redis underlying data structure ----quicklist
C language: how to give an alias to a global variable?
20 | 面向流水线的指令设计(上):一心多用的现代CPU
v-for生成的子组件列表删除第n行出现数据错乱问题
MySQL table partitioning
Redis learning journey sentinel mode
2022 simulated examination question bank and online simulated examination of hoisting machinery command examination questions
Effective Go - The Go Programming Language
随机推荐
Considerations for using redis transactions
21 | pipeline oriented instruction design (Part 2): How did Pentium 4 fail?
2022 electrician (elementary) examination questions and simulation examination
Logback log framework learning and problems
26 | Superscalar和VLIW:如何让CPU的吞吐率超过1
2022 simulated examination question bank and online simulated examination of hoisting machinery command examination questions
Some optimization for seckill project
思路清晰的软光栅小引擎和四元数结合案例
AQS - detailed explanation of reentrantlock source code
17 | establish data path (upper): instruction + operation =cpu
redis面试题
Wechat applet - positioning, map display, route planning and navigation
[MySQL] online lock free delay free DDL artifact GH OST
19 | establish data path (bottom): instruction + operation =cpu
2022年G3锅炉水处理操作证考试题库模拟考试平台操作
QT reading SQLSERVER database
22 | adventure and prediction (I): hazard is both "danger" and "opportunity"
9. process control
P7712 [Ynoi2077] hlcpq
力扣(LeetCode)163. 缺失的区间(2022.06.12)