简体   繁体   English

我可以通过 Jetpack 在我的项目中使用更新版本的 sqlite 吗?

[英]Can i use a newer version of sqlite in my project through Jetpack?

We have come to a condition where we want to use the "lead" and "lag" functions in android but they don't function unless your sqlite version is at least 3.2.我们遇到了一种情况,我们想在 android 中使用“lead”和“lag”功能,但除非您的 sqlite 版本至少为 3.2,否则它们不起作用。 Is it possible for our project to use the newer sqllite versions through Jetpack, and if so, how?我们的项目是否可以通过 Jetpack 使用较新的 sqllite 版本,如果可以,如何使用?

Is it possible for our project to use the newer sqllite versions through Jetpack我们的项目是否可以通过 Jetpack 使用较新的 sqllite 版本

Jetpack does not directly give you a new SQLite version. Jetpack 不会直接为您提供新的 SQLite 版本。

However, if you are using Room, you can use a custom implementation of the SupportSQLiteDatabase family of interfaces.但是,如果您使用的是 Room,则可以使用SupportSQLiteDatabase接口系列的自定义实现。 By default, Room uses its own Framework... versions, which use the built-in SQLite.默认情况下,Room 使用自己的Framework...版本,它使用内置的 SQLite。 But, on your Room.DatabaseBuilder , you can call openHelperFactory() and supply a SupportSQLiteOpenHelper.Factory that uses another implementation.但是,在Room.DatabaseBuilder ,您可以调用openHelperFactory()并提供使用另一个实现的SupportSQLiteOpenHelper.Factory

There are at least two of these that you could use, that are on fairly current versions of SQLite:您至少可以使用其中两个,它们都在当前版本的 SQLite 上:

Both require you to package binaries of SQLite with your app (and cryptography libraries in the case of SQLCipher for Android).两者都要求您将 SQLite 的二进制文件与您的应用程序(以及适用于 Android 的 SQLCipher 的加密库)打包在一起。 This will significantly increase the size of your APK.这将显着增加您的 APK 的大小。

暂无
暂无

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

相关问题 为什么我不能在我的 Jetpack Compose 项目中使用 scrollToEnd 或类似的函数? - why can't I use scrollToEnd or similar functions in my Jetpack Compose project? 我可以在Android项目中使用新版本的HttpClient吗? - Can I use a new version of HttpClient in my Android project? 如何将PMD更新到新版本? - How can I update PMD to newer version? 当我使用appcompat-v7版本23.0.0或更高版本(用于工具栏)时,无法在设备内存上建立目录 - When I use appcompat-v7 version 23.0.0 or newer (for toolbars), I can not make a directory on the device memory 如何使用较新版本的 gradle 构建 Android 项目? - How do I build Android project using a newer version of gradle? 如何在项目中使用使用sqlite创建的数据库? - How do i use the database created using sqlite in my project? 如何在我的 Jetpack Compose 项目中从 Firestore 加载数据? - How can I load data from Firestore in my Jetpack Compose project? 如何将 CameraView 与 Jetpack Compose 结合使用? - How can I use a CameraView with Jetpack Compose? 在Android中安装较新版本时保存我的旧应用程序基于SQLITE的数据库? - Save my older application SQLITE based database while installing the newer version in Android? 使用与之前版本相同的key.jks文件升级到较新版本后,无法在Google Play商店中上传我的应用程序的新版本 - I can not upload new version of my apps in google play store after upgrading to newer version using same key.jks file as the version before
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM