gpt4 book ai didi

android - 关于sqlite数据库的问题,没有这样的表:

转载 作者:IT王子 更新时间:2023-10-29 06:20:05 26 4
gpt4 key购买 nike

我打开一个 sqlite 数据库并使用 rawquery 来获取数据。

但是log.e显示信息:

android.database.sqlite.SQLiteException: no such table: types:

但是,我真的有这张 table 。

我也尝试使用其他sql,但也得到错误信息,例如

android.database.sqlite.SQLiteException: no such table: malls:

我确定有这两张表。那么为什么会收到错误消息呢?

最佳答案

如果这是在模拟器上,请使用 DDMS 文件资源管理器或 adb pull 下载数据库文件的副本并确认其内容。

And i crate a custom SQLiteOpenHelper to copy this file to path : /data/data/com.SGMalls/databases/mallMapv2.sqlite

如果您试图在 SQLiteOpenHelperonCreate() 中复制文件,那么您就太晚了。我会在那之前做。

So the copy file code may be can not copy the complete file.

在这种情况下,您更有可能收到有关损坏文件的错误。

关于android - 关于sqlite数据库的问题,没有这样的表: ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2342346/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com