当前位置:网站首页>The first quickapp demo
The first quickapp demo
2022-07-02 07:15:00 【android_ Mr_ summer】
brief introduction
With 3 month 20 Fast application developed by Beijing on (quickapp) Release , Major mobile app manufacturers have joined the ranks of fast apps , The application module is based on the standard js grammar + restructuring css label +Flexbox Layout +mvvm Pattern . It is similar to the attachment of wechat applet in wechat , And fast application depends on major application markets , Searchable direct open , Convenient operation without installation .
Environment building (window platform )
- install nodejs( Official website ).
- install hap-toolkit( open cmd->npm install -g hap-toolkit)
- After installation, enter the command (hap -V)
The correct output of the version information indicates that the installation is successful . for example (0.0.26)
Two 、 Initialize project
1. Execute the following command to initialize the project
hap init ( The name of your project )After the command is generated , The structure of the directory is as follows
├── node_modules
├── sign rpk Package signature module
│ └── debug Debug environment
│ ├── certificate.pem Certificate file
│ └── private.pem Private key file
├── src
│ ├── Common Common resource files and component files
│ │ └── logo.png manifest.json Configured in icon
│ ├── Demo Page directory
│ | └── index.ux pagefile , The file name does not have to be the same as the parent folder
│ ├── app.ux APP file ( Used to include public resources )
│ └── manifest.json Project profile ( Such as : Application description 、 Interface declaration 、 Page routing, etc )
└── package.json Define various modules and configuration information required by the project ,npm install According to this profile , Automatically download the required running and development environment 2. Compile the project
Install dependency first , Execute the following command in the project root
npm installTo be installed , Use the following command to compile the package generation rpk package
npm run buildAfter compiling and packaging successfully , Folders will be generated under the root directory of the project :build、dist
- build: Temporary output , Include the compiled page js, Pictures, etc
- dist: Final output , contain rpk file . In fact, I will build The resources in the directory are packed and compressed into a file , Suffix named rpk, This rpk File is the final output of the project after compilation
Use the following command to automatically recompile ,
npm run watchBe careful :

If you encounter the above error message , We can order hap update –force To solve this problem
3、 ... and 、 debugging
1. Install debugger
1. The debugger is a android application , direct download
2. Buttons cannot be clicked , It needs to be installed again Platform preview
After two applications are installed, you can install fast applications

2. Installation and operation rpk package
There are two ways :
* HTTP request : Developers start HTTP The server , Open the debugger , Click scan code to install configuration HTTP Server address , download rpk package , And arouse the platform to run rpk package
* Local installation : Developers will rpk Copy the package to the mobile file system , Open the debugger , Click local installation to select rpk package , And arouse the platform to run rpk package
Recommend the first way , Debugging is more convenient .
http Request mode :
Carry out orders :
// Default port 12306
npm run server
Successful execution will display the QR code , You can use the debugger to scan the QR code and install , Or click the top right corner of the debugger to set http Click online update for the server address .
At this time, cooperate with the command npm run watch
“`
You can preview the effect while developing
3. Recommended IDE
The recommended ide by vscode+hap extension Plug-in development , Plug in installation : 
Recommended links :
边栏推荐
- Oracle rman自动恢复脚本(生产数据向测试迁移)
- @Transational踩坑
- ORACLE EBS ADI 开发步骤
- MapReduce与YARN原理解析
- SQL注入闭合判断
- Only the background of famous universities and factories can programmers have a way out? Netizen: two, big factory background is OK
- Take you to master the formatter of visual studio code
- JS delete the last bit of the string
- Oracle RMAN semi automatic recovery script restore phase
- Oracle rman半自动恢复脚本-restore阶段
猜你喜欢

ORACLE EBS中消息队列fnd_msg_pub、fnd_message在PL/SQL中的应用

@Transational踩坑

SQLI-LABS通关(less2-less5)

Solve the problem of bindchange event jitter of swiper component of wechat applet

CSRF attack

如何高效开发一款微信小程序

Proteus -- RS-232 dual computer communication

Basic knowledge of software testing

SSM二手交易网站

CVE-2015-1635(MS15-034 )遠程代碼執行漏洞複現
随机推荐
SQLI-LABS通关(less2-less5)
读《敏捷整洁之道:回归本源》后感
Sqli-labs customs clearance (less18-less20)
2021-07-05C#/CAD二次开发创建圆弧(4)
Review of reflection topics
php中的数字金额转换大写数字
Solve the problem of bindchange event jitter of swiper component of wechat applet
ORACLE 11.2.0.3 不停机处理SYSAUX表空间一直增长问题
Basic knowledge of software testing
Cve - 2015 - 1635 (ms15 - 034) réplication de la vulnérabilité d'exécution de code à distance
SQLI-LABS通关(less18-less20)
Sqli labs customs clearance summary-page4
Differences between ts and JS
In depth study of JVM bottom layer (II): hotspot virtual machine object
php中根据数字月份返回月份的英文缩写
Sqli labs customs clearance summary-page2
Anti shake and throttling of JS
离线数仓和bi开发的实践和思考
Proteus -- RS-232 dual computer communication
UEditor .Net版本任意文件上传漏洞复现