Mixed Versions

Troubleshoot and resolve mixed Android SDK dependency versions.

Using multiple Android 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.

The following snippet shows a mixed version conflict caused by using sentry with version 8.6.0 and sentry-android with version 8.7.0. To fix the issue, set the same version for all dependencies or use sentry-bom. This may also happen if you are using an internal library which has a different version defined.

build.gradle
Copied
implementation('io.sentry:sentry:8.6.0')
implementation('io.sentry:sentry-android:8.7.0')

When using our Gradle or Maven plugin and manually defining additional Sentry Android 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.

build.gradle
Copied
plugins { id "io.sentry.android.gradle" version "5.3.0" }

dependencies {
	implementation 'io.sentry:sentry-okhttp:8.1.0'
}

sentry {
	autoInstallation {
		sentryVersion = "8.0.0"
	}
}
Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").