Ten mobile phone manufacturers push the application standard together, the conference ended perfectly
On March 20, millet, zte, huawei, gionee, lenovo, meizu, Nubian, OPPO, vivo, one plus, a total of ten mobile phone manufacturer joint at a quick application standards to start the conference in Beijing, mobile phone manufacturers and China academy of information and communications, telecommunications terminal industry association, China association of software industry and hundreds of well-known mobile Internet application the participation enterprise, Witness the arrival of a new ecosystem of mobile applications.
Wow, good cow force, here to a round of applause, and then each public number, circle of friends, news are in the hair fast application of the news, I rely on, don’t come to gather together a lively, is not feeling oneself behind The Times? Then have one of them.
steps
There’s documentation on the website, so let me just say a couple of things
- Download nodeJs version 6.0 or later, and do not use 8.0.* version. The ZipStream implementation in this version is incompatible with the Node-archive package and will cause an error. After installing Node, you can use node -v to check the version
- NPM install, the root directory of the project that initializes the quick application, will install some libraries, and some warnings will be reported during installation
- NPM run build = NPM run build
It doesn’t matter. It says on the website,
Cannot find Module is encountered if an error occurs'... /webpack.config.js', please execute hap Update --force again. This is because the later version of NPM will check and delete some folders under node_modules during NPM install, causing an error. Hap update --force will re-copy the hap-Toolkit folder to node_modulesCopy the code
Then execute the order
hap update --force
Copy the code
This green let me clench the heart put down, it seems that life must take a little green ah
Continue with the previous command and compile the project
npm run build
Copy the code
perfect
After successful execution, we see that two new directories have been added, one is the build directory and the other is the dist directory
- Temporary output, including compiled page JS, images, etc
- Final output, including RPK files. The RPK file is the final output of the compiled project, just like the APK installation package we installed
The installation
Wait, my Android phone can not recognize your RPK, how to install ah, this has to use the two tools of fast application, give download link
- Quick application debugger APK
- Quick application container
These two let me a little bit about the, “debugger” this tool is used to help us installation RPK application, can sweep yards, local installation, main purpose is to find the RPK file, download the debugger installed, you will find that the button is gray, can’t click, that’s because he didn’t find rely on installation RPK container
“Quick Application Container” : All RPKS run on top of this container, just like Android, which recognizes APK files and runs on them. Fast Application containers recognize RPK files and run on them. Why are you hungry? There is a built-in container for parsing RPK in your system, so there is no need to install it again.
Seeing how many people are using local installations, I went the other way and used qr codes.
Open the Container APK first, then open the Quick Application Debugger so that the quick application debugger is ready to use
First, we CD to the root directory of the project and run the command
npm run server -- --port 8080
Copy the code
I depend, what thing, open the “quick application debugger”, just swept most not swept out, you’re funny than you, remember to scan code installed at that time to play or weex, at least, somebody else can sweep out, well, look at you to tell me, can see qr code generated by the server access address, I will not say what, click on the link to check the qr code
Then use the “debugger” to scan the code, it will automatically open the application, which is shown in the picture below, I am damn, the sample code has at least a few UI examples, you add a welcome page about ????
Then open the “Quick App Container”, you can see our installed apps, you can use this container to open your own installed apps.
conclusion
To be honest, it is very good to play, very native experience, but I feel not far away, this stream application with Dcloud is no different, people have this thing for a long time, not plain, now the market is loud, see more, want to change the pattern? It’s still a little difficult.