The crosswalk of Cordova study notes

Source: Internet
Author: User

Objective

Cordova uses the embedded webview of the phone by default, while crosswalk uses the optimized chromium kernel's browser engine instead of the default WebView to achieve greater compatibility and performance gains.

Body

Using crosswalk in the Cordova project is very easy, just install a plugin on the line

Cordova Plugin Add Cordova-plugin-crosswalk-webview--save

Plug-in Project address: Https://github.com/infil00p/cordova-plugin-crosswalk-webview

The specific use method can consult the project document

In addition, crosswalk offers three modes of default, Shared, Lite

In short, the default mode provides all the functionality, each app has a separate packaged browser engine, while the sharing mode is that multiple apps share the same engine, only need to pack the engine at the first install, then not. Lite is a streamlined version of crosswalk, removing some of the less common features that make packaging smaller.

If you want to use Lite mode, the install command changes to

Cordova Plugin Add Cordova-plugin-crosswalk-webview--variable xwalk_mode= "Lite"--save

It is so simple, then prepare-build, after the packaging of the APK will be much larger than the original, if the original apk size is 10M, the default mode package of the APK will become about 30M, Lite mode around 20M.

End

If the app is running with Deveiceready not fire after 5 seconds error, then Cordova clean the project. In addition, crosswalk is mainly for Android platform optimization, although there are iOS version, but in fact, iOS Cordova performance is very good, so it is not necessary.

The crosswalk of Cordova study notes

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.