Version of SQLite used in Android? Version of SQLite used in Android? database database

Version of SQLite used in Android?


Here is a link to the official docs which include the main points in this answer: android.database.sqlite package-level javadoc

Kotlin code to get framework SQLite version:

val version = android.database.sqlite.SQLiteDatabase.create(null).use {    DatabaseUtils.stringForQuery(it, "SELECT sqlite_version()", null)}println("Framework (API ${Build.VERSION.SDK_INT}) SQLite version: $version")

Using the emulators (note, SQLite version on actual devices will be at least that specified):

API level*VersionNameSQLiteNotes
3112S3.32.2
3011R3.28.0window functions
2910Q3.22.0
289Pie3.22.0
278.1Oreo3.19.4see 3.19.3 and version control check-ins because 3.19.4 link does not exist
268.0Oreo3.18.2O beta versions used 3.18.0
257.1.1Nougat3.9.2
247.0Nougat3.9.2
236.0Marshmallow3.8.10.2M Preview 1 (SDK level 22) used 3.8.10
225.1.1Lollipop3.8.6.1see 3.8.6 and version control check-ins because 3.8.6.1 link does not exist
215.0Lollipop3.8.6
204.4W.2Android Wearunknownno emulator available, but probably either 3.7.11 or 3.8.4.3
194.4KitKat3.7.11
184.3Jelly Bean3.7.11
174.2Jelly Bean3.7.11
16**4.1Jelly Bean3.7.11
154.0.3Ice Cream Sandwich3.7.4
14**4.0Ice Cream Sandwich3.7.4
133.2Honeycomb3.7.4
123.1Honeycomb3.7.4
11**3.0Honeycomb3.7.4
102.3.3Gingerbread3.6.22
92.3.1Gingerbread3.6.22
8**2.2Froyo3.6.22
72.1Eclair3.5.9
41.6Donut3.5.9
3**1.5Cupcake3.5.9

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

** Broken SDK link, see here

Note: if you want your app to use the same version of SQLite across all Android versions, consider using Requery's 3rd party SQLite support library or SQLCipher (if you also want encryption).


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:

Cursor cursor = SQLiteDatabase.create(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.


$ adb shell sqlite3 --version 3.5.9

Same on ADP1 1.6 & 2.1 emulator.