Android SQLite R-Tree - 如何安装模块? [英] Android SQLite R-Tree - How to install module?

查看:9
本文介绍了Android SQLite R-Tree - 如何安装模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://www.sqlite.org/rtree.html 表示 r*树包含在合并中,但默认情况下被禁用"并启用它只需使用定义的 SQLITE_ENABLE_RTREE C 预处理器宏进行编译"

http://www.sqlite.org/rtree.html says that the r*tree is "included as part of the amalgamation but is disabled by default" and to enable it "simply compile with the SQLITE_ENABLE_RTREE C-preprocessor macro defined"

我想在我的 android 应用程序中使用 R-trees,但显然 SQLite 已全部预装等.有没有办法在用户的手机/设备上启用它?

Well I want to use R-trees in my android app, but clearly SQLite is all pre-installed etc. Is there a way to enable it on a user's phone/device?

或者,是否可以使用 NDK 和免费提供的 SQLite 源代码?

Alternatively, is it possible to use the NDK and the freely available source code for SQLite?

推荐答案

您完全可以编译自己的 SQLite 版本.我们这样做是为了从 wxSQLite 启用加密/编解码器模块.查看 Android Git 存储库中的 SQLite 源代码.基本上,它很容易创建一个带有您想要启用的选项(例如 SQLITE_ENABLE_RTREE)的 Android.mk.当然,这会给你一个原生库.为了使用它,您需要从 NDK 访问它或创建一个包装器(同样,您可以查看 Android 存储库和 Java/JNI 包装器到 SQLite)

You can absolutely compile your own version of SQLite. We do this in order to enable the encryption/codec modules from wxSQLite. Take a look at the SQLite source in the Android Git repository. Basically it's as easy and creating a Android.mk with the options (such as SQLITE_ENABLE_RTREE) you'd like enabled. Of course, this will give you a native library. In order to use it you'll need to access it from the NDK or create a wrapper (again, you can look at the Android repository and Java/JNI wrappers to SQLite)

这篇关于Android SQLite R-Tree - 如何安装模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆