---
title: "Migrate from sentry-android 5.x to 6.0.0"
description: "Learn about migrating from Sentry Android SDK 5.x to 6.0.0."
url: https://docs.sentry.io/platforms/android/migration/v5-to-v6/
---

# Migrate from sentry-android 5.x to 6.0.0 | Sentry for Android

* Kotlin plugin is upgraded to `1.5`.

* Kotlin `languageVersion` is upgraded to `1.4`.

* `Gson` is removed as a transitive dependency and vendored in the SDK.

  * Protocol classes now implement the `JsonSerializable` and `JsonDeserializer` interfaces.

* `SentryOptions#shutdownTimeout` is renamed to `shutdownTimeoutMillis`.

* Removed `@Deprecated` and `@ApiStatus.ScheduledForRemoval` methods

  * `ITransaction#setRequest`
  * `ITransaction#getRequest`
  * `ITransaction#getContexts`
  * `SentryBaseEvent#getOriginThrowable`
  * `SentryOptions#getCacheDirSize`
  * `SentryOptions#setCacheDirSize`
  * `SentryOptions#isEnableSessionTracking`
  * `SentryOptions#setEnableSessionTracking`

* Removed unnecessary abstractions

  * `IBuildInfoProvider` is now `BuildInfoProvider` only.
  * `IHandler` is now `MainLooperHandler` only.

* `ISpan` now has higher precision using the `System#nanoTime` instead of milliseconds.

* Hints changed its type from `Object` to `io.sentry.Hint`

*Old*:

```kotlin
Sentry.captureException(RuntimeException("exception"), "myStringHint")
```

*New*:

```kotlin
val hints = mutableMapOf<String, Any>("myHint" to "myStringHint")
Sentry.captureException(RuntimeException("exception"), hints)
```

* `SentryOptions#enableScopeSync` is now enabled by default, to disable it, see the code snippet below.

`AndroidManifest.xml`

```xml
<meta-data
  android:name="io.sentry.ndk.scope-sync.enable"
  android:value="false"
/>
```

* `SentryOptions#sendClientReports` is now enabled by default. To disable it, use the code snippet below:

`AndroidManifest.xml`

```xml
<meta-data
  android:name="io.sentry.send-client-reports"
  android:value="false"
/>
```

## [Sentry Self-hosted Compatibility](https://docs.sentry.io/platforms/android/migration/v5-to-v6.md#sentry-self-hosted-compatibility)

* Starting with version `6.0.0` of `sentry`, [Sentry's version >= v21.9.0](https://github.com/getsentry/self-hosted/releases) is required or you have to manually disable sending client reports via the `sendClientReports` option. This only applies to self-hosted Sentry. If you are using [sentry.io](https://sentry.io), no action is needed.

There are more changes and refactors, but they are not user breaking changes.
