fluttercommunity / flutter_workmanager

A Flutter plugin which allows you to execute code in the background on Android and iOS.
825 stars 247 forks source link

* What went wrong: Execution failed for task ':app:checkDebugDuplicateClasses'. > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable > Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and jetified-kotlin-stdlib-jdk8-1.7.20 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.20) Duplicate class kotlin.internal.jdk8.JDK8PlatformImplementations found in modules jetified-kotlin-stdlib-1.8.10 (org.jetbrains #526

Closed shakibhoseen closed 5 months ago

shakibhoseen commented 6 months ago

Version

Technology Version
Workmanager version
Xcode version
Swift version
iOS deployment target

Describe the error Describe error Optionally provide the least amount of code that shows this behaviour. Ideally in the sample app.

Output of flutter doctor -v

BingCoke commented 6 months ago

I fight with it for a day, and fix it! add next code in android/build.gradle

  configurations.all {
    resolutionStrategy {
        eachDependency {
            if ((requested.group == "org.jetbrains.kotlin") && (requested.name.startsWith("kotlin-stdlib"))) {
                useVersion("1.8.22")
            }
        }
    }
  }

put it in 'allprojects'

hgari commented 5 months ago

thanks @BingCoke !

shakibhoseen commented 5 months ago

thank you so much @BingCoke

md-rifatkhan commented 4 months ago

After 3 hour of coding i just got this 😂😂, how pain that was,

Thank you so much @BingCoke

maz341 commented 1 month ago

I changed my Kotlin version to 1.8.22.

android -> settings.gradle

id "org.jetbrains.kotlin.android" version "1.8.22" apply false

Navindu-Ashen commented 2 weeks ago

thankyou @BingCoke