如何升级SQLite版本?
问题描述:
我发展我的第一个应用程序,并使用下面的代码,我看到的是我的SQLite版本:如何升级SQLite版本?
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);
我的版本是3.7.11。
因为我需要使用一些新的功能,如何升级到最新版本?
答
您使用SQLiteDatabase
访问的SQLite库是Android的一部分,无法替换(除非您在根设备上重新编译Android)。
你必须compile your own copy of SQLite with the NDK并通过你自己的包装函数/对象访问它。
即使我在我的手机上做到了,如何让我的应用程序兼容所有设备?所以SQLite的版本与手机有关,我认为我依赖Android SDK ... – smartmouse 2014-09-28 18:37:46
你用NDK编译的东西可以让你的应用获得更多的好处。 – 2014-09-28 19:06:27