You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
+
117
154
## Zone Mismatch Error on Web
118
155
119
156
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.
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
+
347
384
## Uninstalling the SDK
348
385
349
386
To remove the SDK from your project, run the following commands:
0 commit comments