Fixing Bug app-checkDebugDuplicateClasses (FBDC)


FBDC:    GAEXE ARMY




Hi guys, this time I want to share an unfortunate experience after updating my macOS to the latest Ventura version.

Long story short, after the OS update was completed, I reopened my Android project that I’d been working on, and—“what the heck”—my project was immediately filled with red reports during the build process.

I tried my usual methods to fix it, but they didn’t work, so I resorted to some “Google-fu” to investigate this surprising error.

The error showed up as:

:app:checkDebugDuplicateClasses
   Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and kotlin-stdlib-jdk8-1.6.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21)

After quite a bit of exploring, I finally found the solution, and I wanted to share it here with fellow devs, especially since this issue is pretty fresh.

Just add this dependency to build.gradle (module), and you’re good to go!

dependencies {

    (...)

    // Fix Duplicate class
    implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))

}
 
Hope this helps!

Post a Comment

Previous Next

نموذج الاتصال