[英]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 上:
https://github.com/requery/sqlite-android https://github.com/requery/sqlite-android
SQLCipher for Android , right now by way of my CWAC-SafeRoom library SQLCipher for Android ,现在通过我的CWAC-SafeRoom 库
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.