# Mixed Versions | Sentry for Logback

Using multiple Java SDK dependencies with mixed versions is not supported as it is very likely to lead to a crash later on. For this reason we chose to crash the application on SDK init instead.

## [Multiple Dependencies With Mixed Versions](https://docs.sentry.io/.md#multiple-dependencies-with-mixed-versions)

The following snippet shows a mixed version conflict caused by using `sentry` with version `8.6.0` and `sentry-logback` with version `8.7.0`. To fix the issue please set the same version for all dependencies or [use `sentry-bom`](https://docs.sentry.io/platforms/java/guides/logback/configuration/bill-of-materials.md). This may also happen if you are using an internal library which has a different version defined.

`build.gradle`

```groovy
implementation('io.sentry:sentry:8.6.0')
implementation('io.sentry:sentry-logback:8.7.0')
```

## [Build Plugin And Explicit Dependency](https://docs.sentry.io/.md#build-plugin-and-explicit-dependency)

When using our Gradle or Maven plugin and manually defining additional Sentry Java SDK dependencies, it is also possible to end up with mixed versions. The following snippet shows the plugin being configured to use version `8.0.0`, but there is an additional dependency that has been set to version `8.1.0`. To fix the issue, set the same version or [use `sentry-bom`](https://docs.sentry.io/platforms/java/guides/logback/configuration/bill-of-materials.md).

`build.gradle`

```groovy
plugins { id "io.sentry.android.gradle" version "5.3.0" }

dependencies {
	implementation 'io.sentry:sentry-opentelemetry-agentless-spring:8.1.0'
}

sentry {
	autoInstallation {
		sentryVersion = "8.0.0"
	}
}
```

## [Agent Version And Build Time Version](https://docs.sentry.io/.md#agent-version-and-build-time-version)

When using `sentry-opentelemetry-agent` you may end up using a version of the Agent that differs from other Sentry Java SDK dependencies you are using. This is also not supported. Use the same version for `sentry-opentelemetry-agent` and all other Java SDK dependencies.
