How to upgrade SQLite version?

安稳与你 提交于 2019-12-13 00:34:57

问题


I'm developing my first app and using the following code I see what is my SQLite version:

Cursor cursor = SQLiteDatabase.openOrCreateDatabase(":memory:", null).rawQuery("select sqlite_version() AS sqlite_version", null);
String sqliteVersion = "";
while(cursor.moveToNext())
    sqliteVersion += cursor.getString(0);
Log.e("Version", sqliteVersion);

My version is 3.7.11.

Since I need to use some new features, how to upgrade it to the latest version?


回答1:


The SQLite library that you access with SQLiteDatabase is part of Android and cannot be replaced (unless you recompile Android on a rooted device).

You have to compile your own copy of SQLite with the NDK and access it through your own wrapper functions/objects.



来源:https://stackoverflow.com/questions/26087182/how-to-upgrade-sqlite-version

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!