Execution failed for task ':app:checkDebugDuplicateClasses'.
Describe your issue. If applicable, add screenshots to help explain your problem.
- What went wrong: Execution failed for task ':app:checkDebugDuplicateClasses'.
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable Duplicate class com.google.firebase.iid.FirebaseInstanceIdReceiver found in modules firebase-iid-20.1.5.aar -> jetified-firebase-iid-20.1.5-runtime (com.google.firebase:firebase-iid:20.1.5) and firebase-messaging-24.1.0.aar -> jetified-firebase-messaging-24.1.0-runtime (com.google.firebase:firebase-messaging:24.1.0)
Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. Get more help at https://help.gradle.org.
BUILD FAILED in 31s Error: Gradle task assembleDebug failed with exit code 1
Steps to reproduce.
Its crashing app to build
- What went wrong: Execution failed for task ':app:checkDebugDuplicateClasses'.
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable Duplicate class com.google.firebase.iid.FirebaseInstanceIdReceiver found in modules firebase-iid-20.1.5.aar -> jetified-firebase-iid-20.1.5-runtime (com.google.firebase:firebase-iid:20.1.5) and firebase-messaging-24.1.0.aar -> jetified-firebase-messaging-24.1.0-runtime (com.google.firebase:firebase-messaging:24.1.0)
Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. Get more help at https://help.gradle.org.
BUILD FAILED in 31s Error: Gradle task assembleDebug failed with exit code 1
What is the expected result?
it should create the app so i can test the app
Did you try our example app?
Yes
Is it reproducible in the example app?
Yes
Reproducible in which OS?
Android
Flutter/Dart Version?
Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.27.1, on macOS 15.2 24C101 darwin-x64, locale en-PK) [✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 16.0) [✓] Chrome - develop for the web [✓] Android Studio (version 2024.1) [✓] VS Code (version 1.96.3) [✓] Connected device (5 available) [✓] Network resources
Plugin Version?
plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" id "com.android.application" version "8.1.0" apply false // START: FlutterFire Configuration id "com.google.gms.google-services" version "4.3.15" apply false // END: FlutterFire Configuration id "org.jetbrains.kotlin.android" version "2.0.21" apply false }
I am also facing the same issue.