---
title: Sentry incompatibility (Android)
source: https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile-android/troubleshoot/sentry-incompatibility-android
---

## Problem

Integrating both the New Relic Android agent and Sentry monitoring SDK can lead to conflicts, crashes, or errors within your app.

This is known to cause issues like `java.lang.StackOverflowError`.

## Solution

You'll need to prevent the Android agent from instrumenting the Sentry Monitoring SDK. To achieve this, configure the New Relic agent to exclude the Sentry package from instrumentation. Here's how:

-   Add the following block to your `build.gradle` file:

    ```groovy
    newrelic {
      // Don't instrument sample classes
      excludePackageInstrumentation("io.sentry.*")
    }
    ```

This configuration tells the New Relic agent to skip instrumenting any classes within the `io.sentry` package.

If you encounter any issues or require additional help, you can reach New Relic support at [support.newrelic.com](https://support.newrelic.com).
