Sentry Android Gradle Plugin (AGP)

Learn how to configure the Sentry Android Gradle Plugin to automatically upload source maps and debug symbols for your Expo project.

To enable the plugin modify the Expo application configuration and add the enableAndroidGradlePlugin option in the @sentry/react-native/expo plugin section.

Copied
{
  "expo": {
...
    "plugins": [
      [
        "@sentry/react-native/expo",
        {
          "url": "https://sentry.io/",
          "project": "project-slug",
          "organization": "organization-slug",
          "experimental_android": {
            "enableAndroidGradlePlugin": true,
          }
        }
      ],
...
  }
}

The supported Sentry Android Gradle Plugin options are the following:

  • autoUploadProguardMapping
  • includeProguardMapping
  • dexguardEnabled
  • uploadNativeSymbols
  • autoUploadNativeSymbols
  • includeNativeSources
  • includeSourceContext

Those should be added in the experimental_android section.

Copied
{
  "expo": {
...
    "plugins": [
      [
        "@sentry/react-native/expo",
        {
...
          "experimental_android": {
            "enableAndroidGradlePlugin": true,
            "autoUploadProguardMapping": true,
            "includeProguardMapping": true,
            "dexguardEnabled": true,
            "uploadNativeSymbols": true,
            "autoUploadNativeSymbols": true,
            "includeNativeSources": true,
            "includeSourceContext": true,
          }
        }
      ],
...
  }
}
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").