简体   繁体   English

android webview版本是否取决于sdk或设备?

[英]does the android webview version depends on the sdk or the device?

Android 5 is upgrading the WebView to Chromium 37. Does it mean I have to use the latest sdk for android 5 to enjoy the benefits, or the WebView will be automatically updated for the app once the user has been upgraded to android 5? Android 5正在将WebView升级到Chromium37。这是否意味着我必须使用Android 5的最新SDK才能享受这些好处,否则一旦用户升级到Android 5,WebView将自动为该应用程序更新? What if I use android 5 SDK to create an apk and run it on an older version of android device? 如果我使用android 5 SDK创建apk并在较旧版本的android设备上运行该怎么办?

Thanks! 谢谢!

Starting with Lollipop, WebView is updated on the device through Play Store/Play Services. 从Lollipop开始,WebView通过Play商店/ Play服务在设备上更新。 Your app will use the WebView that is on the device, unless you specifically include another version in your apk and use that (not typically done). 您的应用将使用设备上的WebView,除非您在apk中明确包含了另一个版本并使用了该版本(通常不这样做)。

The targetSdkVersion you build with will not have any affect on what WebView is installed on the device. 用来构建的targetSdkVersion不会对设备上安装的WebView产生任何影响。

The initial release for Android 5.0 includes a version of Chromium for WebView based on the Chromium M37 release, adding support for WebRTC, WebAudio, and WebGL. Android 5.0的初始版本包括基于Chromium M37版本的Chromium for WebView版本,并增加了对WebRTC,WebAudio和WebGL的支持。

Chromium M37 also includes native support for all of the Web Components specifications: Custom Elements, Shadow DOM, HTML Imports, and Templates. Chromium M37还包括对所有Web组件规范的本地支持:自定义元素,Shadow DOM,HTML导入和模板。 This means you can use Polymer and its material design elements in a WebView without needing polyfills. 这意味着您可以在WebView中使用Polymer及其材料设计元素,而无需使用polyfill。

Although WebView has been based on Chromium since Android 4.4, the Chromium layer is now updatable from Google Play. 尽管从Android 4.4开始,WebView一直基于Chromium,但现在可以从Google Play更新Chromium层。

As new versions of Chromium become available, users can update from Google Play to ensure they get the latest enhancements and bug fixes for WebView, providing the latest web APIs and bug fixes for apps using WebView on Android 5.0 and higher. 随着新版本的Chromium可用,用户可以从Google Play更新以确保他们获得了WebView的最新增强功能和错误修复程序,并为使用Android 5.0及更高版本上的WebView的应用程序提供了最新的Web API和错误修复程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM