Abstract SQLite interfaces with basic implementations, plus framework bindings and language-friendly extensions to build customized database access layers; intended as a lightweight alternative to higher-level ORMs.
The androidx.sqlite library contains abstract interfaces along with basic implementations which can be used to build your own libraries that access SQLite. You might want to consider using the Room library, which provides an abstraction layer over SQLite to allow for more robust database access while harnessing the full power of SQLite.
To add a dependency on Sqlite, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.
Add the dependencies for the artifacts you need in the build.gradle file for your app or module:
dependencies {
val sqlite_version = "2.6.2"
// Java language implementation
implementation("androidx.sqlite:sqlite:$sqlite_version")
// Kotlin
implementation("androidx.sqlite:sqlite-ktx:$sqlite_version")
// Implementation of the AndroidX SQLite interfaces via the Android framework APIs.
implementation("androidx.sqlite:sqlite-framework:$sqlite_version")
}
dependencies {
def sqlite_version = "2.6.2"
// Java language implementation
implementation "androidx.sqlite:sqlite:$sqlite_version"
// Kotlin
implementation "androidx.sqlite:sqlite-ktx:$sqlite_version"
// Implementation of the AndroidX SQLite interfaces via the Android framework APIs.
implementation "androidx.sqlite:sqlite-framework:$sqlite_version"
}
For more information about dependencies, see Add build dependencies.
The androidx.sqlite library contains abstract interfaces along with basic implementations which can be used to build your own libraries that access SQLite. You might want to consider using the Room library, which provides an abstraction layer over SQLite to allow for more robust database access while harnessing the full power of SQLite.
To add a dependency on Sqlite, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.
Add the dependencies for the artifacts you need in the build.gradle file for your app or module:
dependencies {
val sqlite_version = "2.6.2"
// Java language implementation
implementation("androidx.sqlite:sqlite:$sqlite_version")
// Kotlin
implementation("androidx.sqlite:sqlite-ktx:$sqlite_version")
// Implementation of the AndroidX SQLite interfaces via the Android framework APIs.
implementation("androidx.sqlite:sqlite-framework:$sqlite_version")
}
dependencies {
def sqlite_version = "2.6.2"
// Java language implementation
implementation "androidx.sqlite:sqlite:$sqlite_version"
// Kotlin
implementation "androidx.sqlite:sqlite-ktx:$sqlite_version"
// Implementation of the AndroidX SQLite interfaces via the Android framework APIs.
implementation "androidx.sqlite:sqlite-framework:$sqlite_version"
}
For more information about dependencies, see Add build dependencies.