Skip to content

Commit 008a160

Browse files
romtsncursoragent
andauthored
chore(troubleshooting): Add circular dependency troubleshooting entry for React Native and Flutter (#14593)
Co-authored-by: Cursor Agent <[email protected]>
1 parent 70ba6d0 commit 008a160

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed

docs/platforms/dart/guides/flutter/troubleshooting.mdx

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,43 @@ endforeach()
114114

115115
This allows cmake to use the correct install command `install(PROGRAMS ..)` instead of `install(FILES ..)` which strips the executable bit.
116116

117+
## Sentry Android Gradle Plugin Circular Dependency
118+
119+
If you encounter a circular dependency error when building your Android app with the Sentry Android Gradle Plugin, this is typically caused by using an older version of the Android Gradle Plugin (AGP).
120+
121+
### Error Example
122+
123+
You might see an error similar to:
124+
```
125+
Circular dependency between the following tasks:
126+
:app:compileReleaseJavaWithJavac
127+
:app:generateSentryProguardUuidProductionRelease
128+
```
129+
130+
### Solution
131+
132+
Update your Android Gradle Plugin to version **7.4** or higher. In your `android/build.gradle` (project-level) file:
133+
134+
```groovy {filename:android/build.gradle}
135+
buildscript {
136+
dependencies {
137+
classpath("com.android.tools.build:gradle:7.4.0") // or higher
138+
}
139+
}
140+
```
141+
142+
Or if using the plugins block in your `android/app/build.gradle`:
143+
144+
```groovy {filename:android/app/build.gradle}
145+
plugins {
146+
id "com.android.application" version "7.4.0" // or higher
147+
}
148+
```
149+
150+
AGP 7.4+ introduced new APIs for injecting into assets that the Sentry Android Gradle Plugin uses to avoid this circular dependency. Since AGP 7.4 was released in 2023, we recommend upgrading to the latest stable version.
151+
152+
For more information, see [GitHub issue #756](https://github.com/getsentry/sentry-android-gradle-plugin/issues/756).
153+
117154
## Zone Mismatch Error on Web
118155

119156
By default, the Sentry Flutter SDK creates a custom zone on web for automatic error and breadcrumb tracking. This can lead to zone mismatch errors when your application calls `WidgetsBinding.ensureInitialized()` before initializing Sentry.

docs/platforms/react-native/troubleshooting/index.mdx

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,43 @@ You can also use [Advanced Data Scrubbing](/security-legal-pii/scrubbing/advance
344344
[Replace] [Anything] from [contexts.trace.data.previousRoute.params]
345345
```
346346
347+
## Sentry Android Gradle Plugin Circular Dependency
348+
349+
If you encounter a circular dependency error when building your Android app with the Sentry Android Gradle Plugin, this is typically caused by using an older version of the Android Gradle Plugin (AGP).
350+
351+
### Error Example
352+
353+
You might see an error similar to:
354+
```
355+
Circular dependency between the following tasks:
356+
:app:compileReleaseJavaWithJavac
357+
:app:generateSentryProguardUuidProductionRelease
358+
```
359+
360+
### Solution
361+
362+
Update your Android Gradle Plugin to version **7.4** or higher. In your `android/build.gradle` (project-level) file:
363+
364+
```groovy {filename:android/build.gradle}
365+
buildscript {
366+
dependencies {
367+
classpath("com.android.tools.build:gradle:7.4.0") // or higher
368+
}
369+
}
370+
```
371+
372+
Or if using the plugins block in your `android/app/build.gradle`:
373+
374+
```groovy {filename:android/app/build.gradle}
375+
plugins {
376+
id "com.android.application" version "7.4.0" // or higher
377+
}
378+
```
379+
380+
AGP 7.4+ introduced new APIs for injecting into assets that the Sentry Android Gradle Plugin uses to avoid this circular dependency. Since AGP 7.4 was released in 2023, we recommend upgrading to the latest stable version.
381+
382+
For more information, see [GitHub issue #756](https://github.com/getsentry/sentry-android-gradle-plugin/issues/756).
383+
347384
## Uninstalling the SDK
348385
349386
To remove the SDK from your project, run the following commands:

0 commit comments

Comments
 (0)