What is the version of SQLite used in Android?
Reason: I\'m wondering how to handle schema migrations. The newer SQLite versions support an \"ALTER TABLE\" SQL comma
UPDATE OCT 2016: Here is a link to the updated official docs which includes the main points in this answer: android.database.sqlite package-level javadoc
Using the emulators:
adb shell sqlite3 --version
UPDATE: Since SDK 29 (emulator revision 8), the adb shell command gives:
/system/bin/sh: sqlite3: inaccessible or not found
Any ideas why? Issue tracker here.
SQLite 3.28.0 (window functions!):
SQLite 3.22.0:
SQLite 3.19.4 (for some reason 3.19.4 does not exist in sqlite release notes! so linking to version control check-ins instead):
SQLite 3.18.2:
SQLite 3.9.2:
SQLite 3.8.10.2:
SQLite 3.8.6.1 (SQLite link is for 3.8.6 because 3.8.6.1 does not exist for some reason):
SQLite 3.8.6:
SQLite (unknown):
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: adb command to get SQLite version only works on emulators and on devices with sqlite3 available: https://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.
Note: if you want your app to use the same version of SQLite across all Android versions, consider using this 3rd party SQLite support library.