机器人的WebView setDatabasePath德precated [英] android webview setDatabasePath deprecated

查看:867
本文介绍了机器人的WebView setDatabasePath德precated的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此方法去$ P $ API等级pcated 19
数据库路径由实施管理,调用此方法不会有任何效果。

This method was deprecated in API level 19 Database paths are managed by the implementation and calling this method will have no effect.

我用 setDatabasePath 来设置web视图的数据库路径。

I use setDatabasePath to set the database path of the webview.

String databasePath = this.getApplicationContext().getDir("database", Context.MODE_PRIVATE).getPath(); 
settings.setDatabasePath(databasePath);

这是否意味着在19 API,它不能再找到我的数据库?如何解决此问题? (这是什么意思有:数据库路径由实施管理的)

Does this mean in API 19 it cant find my database anymore?? How to solve this? (What do they mean with: Database paths are managed by the implementation)

推荐答案

API级别19指的是Android 4.4奇巧,在该浏览器引擎从Android的WebKit的切换到铬的WebKit,几乎所有包裹同行原来的WebView的API铬的WebKit。

API level 19 means Android 4.4 KitKat, in which the browser engine is switched from Android webkit to chromium webkit, with almost all the original WebView APIs wrapped to the counterparts of chromium webkit.

这意味着,大多数的WebView API实现都来自Android 4.3及以前不同,incuding数据库存储API。这也意味着由于Android 4.4开发人员不能(或没有)分配一个替代数据库路径;这一切都是Android的默认处理。

That means most of the implementations of WebView APIs are different from Android 4.3 and before, incuding the database storage API. That also means since Android 4.4 developers cannot (or don't have to) assign an alternative db path; all this is handled by Android by default.

的实施管理意味着现在的数据库存储路径是由铬的WebKit引擎处理在默认情况下,而Android 4.4之前,在 Android的处理。 WebKit的在框架层,需要进行设置。

managed by the implementation now means the database storage path is handled by chromium webkit engine by default, while before Android 4.4 it's handled in android.webkit in framework layer which needs to be set.

这篇关于机器人的WebView setDatabasePath德precated的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆