android - 如何在 android 中使用 sqlite fts5 创建表?

标签 android android-sqlite sqliteopenhelper

我想使用 fts5 扩展创建一个表

CREATE VIRTUAL TABLE TABLE_FTS_FOOD_ITEM USING fts5 (content='food_items', Shrt_Desc, Energy_Kcal);

但是我收到了这个错误。

android.database.sqlite.SQLiteException: no such module: fts5

之前我使用的是 fts4,它运行良好。 我可以在 android 中将 fts5 与 sqlitedatabase 一起使用吗?

最佳答案

FTS5 在 SQLite 3.9.0 之前不可用,甚至在默认情况下被禁用,因此它不太可能成为 Android 附带的任何 SQLite 库的一部分。

关于android - 如何在 android 中使用 sqlite fts5 创建表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43291769/

相关文章:

java - Android 插入数据库时​​出错,代码 19 : constraint failed

Android 将 ContentProvider 分发为与应用程序 bundle 在一起的库

android - 为什么 java.lang.Integer 在 Android Studio 的自动 Parcelable 实现中被忽略?

Android (Things) GATT 服务器停止广告

android - 未发送 Google App Invites 邀请

android - Sqlite 更新 DATETIME 字段不工作

android - 如何在android sqlite中检索两个日期之间的数据

java - 有人能告诉我为什么这个 if 语句总是给我 false 吗?

android - SQLiteOpenHelper onCreate()/onUpgrade() 何时运行?

android - 将JSON数据插入android中的SQLite数据库