无法从JavaScript打开sqlite数据库

无法从JavaScript打开sqlite数据库

本文介绍了无法从JavaScript打开sqlite数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



但是当我调用window.openDatabase()方法时,方法下面的消息出现在LogCat上,并且查询返回没有这样的表错误。



物理.db文件是存在的,似乎可以从Java代码,但不能从JavaScript代码
访问。卸载或清除数据并重新安装应用程序对此没有帮助。



我无法解决此错误,请帮助&


解决方案

由JavaScript从Javascript代码创建的数据库,以下主题可能会回答您的问题:



/ p>

I'm trying to read sqlite database from the JS side which is created/updated by Android Activity or Service.

But when I call window.openDatabase() method the message below is appear on the LogCat, and Query returns 'no such table' error.

physical .db file is there and seems to accessible from within the Java code, but cannotaccess from the JavaScript code. Uninstall or Clear data and reinstall the app did no help with this.

I have no clue to solve this error please help & any suggestions are very appreciated.

If you are trying to access the database created by Activity from the Javascript code, the following thread might answer your question:

How do I call window.openDatabase from a webView hosted in an android application?

这篇关于无法从JavaScript打开sqlite数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 14:53