> For the complete documentation index, see [llms.txt](https://docs.luciq.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.luciq.ai/android/set-up-luciq-for-android/integrate-luciq-on-android/updating-the-sdk.md).

# Updating the SDK

Learn how to update the Luciq SDK in your Android app. Follow migration steps to upgrade to the latest version and access new features and bug fixes.

{% hint style="warning" %}
Ensure that the Luciq version is consistent across all dependencies and the Luciq Gradle plugin, as illustrated below. From SDK version 19.14.0, a plugin newer than the SDK skips the instrumentation that SDK doesn't support and logs a build warning.
{% endhint %}

### Gradle Groovy DSL

#### Updating the Luciq Gradle Plugin

To update to the latest version `14.0.0`, modify the root `build.gradle` file as follows:

{% code overflow="wrap" %}

```
buildscript {  
    dependencies {  
        classpath "ai.luciq.library:luciq-plugin:18.0.0"  
    }  
}
```

{% endcode %}

#### Updating the Luciq Dependency

In the Application’s `build.gradle` file, include the following dependencies:

{% code overflow="wrap" %}

```
..  
dependencies {  
    // App dependencies  
    implementation("ai.luciq.library:luciq:18.0.0")  
    implementation("ai.luciq.library:luciq-ndk-crash:18.0.0") // optional  
    implementation("ai.luciq.library:luciq-compose:18.0.0") // optional  
    implementation("ai.luciq.library:luciq-with-okhttp-interceptor:18.0.0") // optional  
    implementation("ai.luciq.library:luciq-apm-okhttp-interceptor:18.0.0") // optional  
    implementation("ai.luciq.library:luciq-apm-grpc-interceptor:18.0.0") // optional  
}
```

{% endcode %}

***

### Gradle Kotlin DSL

#### Updating the Luciq Gradle Plugin

To update to the latest version `14.0.0,` adjust the root `build.gradle` file as shown below:

{% code overflow="wrap" %}

```
plugins {  
    id("ai.luciq.library") version "18.0.0" apply false // optional, only add if using any Luciq plugins  
}
```

{% endcode %}

#### Updating the Luciq Dependency

In the Application’s `build.gradle.kts` file, include the following dependencies:

{% code overflow="wrap" %}

```
dependencies {  
    // App dependencies  
    implementation("ai.luciq.library:luciq:18.0.0")  
    implementation("ai.luciq.library:luciq-ndk-crash:18.0.0") // optional  
    implementation("ai.luciq.library:luciq-compose:18.0.0") // optional  
    implementation("ai.luciq.library:luciq-with-okhttp-interceptor:18.0.0") // optional  
    implementation("ai.luciq.library:luciq-apm-okhttp-interceptor:18.0.0") // optional  
    implementation("ai.luciq.library:luciq-apm-grpc-interceptor:18.0.0") // optional  
}
```

{% endcode %}

***

## Gradle Version Catalog TOML

{% hint style="warning" %}
Ensure that the Luciq version is consistent across all dependencies and the Luciq Gradle plugin, as illustrated below. From SDK version 19.14.0, a plugin newer than the SDK skips the instrumentation that SDK doesn't support and logs a build warning.
{% endhint %}

### Updating the libs.versions.toml File

To update the Luciq version to `14.0.0,` make the following changes:

{% code overflow="wrap" %}

```
dependencies {  
    // App dependencies  
    implementation("ai.luciq.library:luciq:18.0.0")  
    implementation("ai.luciq.library:luciq-ndk-crash:18.0.0") // optional  
    implementation("ai.luciq.library:luciq-compose:18.0.0") // optional  
    implementation("ai.luciq.library:luciq-with-okhttp-interceptor:18.0.0") // optional  
    implementation("ai.luciq.library:luciq-apm-okhttp-interceptor:18.0.0") // optional  
    implementation("ai.luciq.library:luciq-apm-grpc-interceptor:18.0.0") // optional  
}
```

{% endcode %}

### Updating the Luciq Gradle Plugin

In the root `build.gradle.kts` file, include:

```
plugins {  
    alias(libs.plugins.luciq.plugin) apply false  
}
```

### Updating the Luciq Dependency

In the App's `build.gradle.kts` file, configure as follows:

{% code overflow="wrap" %}

```
plugins {
    id("com.android.application")
    id("org.jetbrains.kotlin.android")
    id("luciq") // optional
    id("luciq-apm") // optional
    id("luciq-crash") // optional
    id("luciq-compiler-extension") // optional
}
luciq { // Plugins configuration
    webViewsTrackingEnabled = true // Enables automatic WebView collection, default is false (moved from apm {} in v19.2.0)
    setCaptureComposeNavigationDestinations(true) // Enables automatic screen identification for Compose, default is false
    crashReporting { // Crash reporting configuration
        autoUploadEnabled = false // Enables/disables uploading for whitelisted variants, default is false
        appToken = "token" // Provides the application's token
        experimentalGuardSquareSupportEnabled = false // Enables/disables GuardSquare's product checking and processing, default is false
    }
    apm { // APM Configurations
        fragmentSpansEnabled = true // Enables fragment spans collection, default is false; feature won't work if disabled from the plugin
        networkEnabled = true // Enables automatic network interception (OkHttp & URLConnection), default is true
    }
    compilerExtension { // Compiler extension configurations
        version = "x.y.z" // Luciq compiler extension version that matches Kotlin version for compatibility. Refer to https://docs.luciq.ai/android/set-up-luciq-for-android/kotlin-compilers-compatibility
    }
}
dependencies {
    implementation(libs.luciq.main)
    implementation(libs.luciq.ndk.crash) // optional
    implementation(libs.luciq.compose) // optional
    implementation(libs.luciq.apm.okhttp) // optional
    implementation(libs.luciq.apm.grpc) // optional
    implementation(libs.luciq.okhttp) // optional
}
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.luciq.ai/android/set-up-luciq-for-android/integrate-luciq-on-android/updating-the-sdk.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
