Version of SQLite used in Android?

时间:2014-05-27 16:06:58   收藏:0   阅读:389

sing the emulators (adb shell sqlite3 --version):

SQLite 3.7.11:

SQLite 3.7.4:

SQLite 3.6.22:

SQLite 3.5.9:

Note: Android SDK level links show where the android.database.sqlite package has changed. Where there is no link (e.g. SDK level 17), indicates no changes to that package.

Note: Here are some anomalies (list by no means exhaustive):

SQLite 3.7.13 (instead of 3.7.11):

SQLite 3.7.6.3 (instead of 3.6.22):

SQLite 3.7.5 (instead of 3.7.4):

SQLite 3.7.0.1 (instead of 3.6.22):

SQLite 3.6.23.1 (instead of 3.5.9):

Note: adb command to get SQLite version only works on emulators and on devices with sqlite3 available: http://stackoverflow.com/a/3645800/444761

For other devices, see Juri‘s answer.

I have added an Issue #58909 to the Android Issue Tracker. Please star this if you would like to support it.

 

Although the documentation gives 3.4.0 as reference number, if you execute the following sql, you‘ll notice that there is a much higher number of SQlite installed:

Cursorcursor= SQLiteDatabase.openOrCreateDatabase(":memory:",null).rawQuery("select sqlite_version() AS sqlite_version",null);
String sqliteVersion ="";while(cursor.moveToNext()){
   sqliteVersion +=cursor.getString(0);}

This is just a piece of quick, dirty code to retrieve the sqlite version. For instance on a HTC Hero with Android 2.1, I get: 3.5.9.

On my Nexus One with Android 2.2, I even get 3.6.22.

Version of SQLite used in Android?,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!