What this error means
Two dependencies include the same Java or Kotlin classes — usually different Kotlin standard library versions pulled in by plugins.
Why it happens
Two dependencies on the release classpath ship the same classes. Plugin versions that pull different Kotlin standard-library artifacts are the common case.
The message tools print
Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules kotlin-stdlib-1.8.22 (org.jetbrains.kotlin:kotlin-stdlib:1.8.22) and kotlin-stdlib-jdk8-1.7.10 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10)How to fix it
- Update the plugins involved so they agree on Kotlin.
- Or align Kotlin by adding the Kotlin BOM (org.jetbrains.kotlin:kotlin-bom, with your Kotlin version) as a platform dependency in android/app/build.gradle.
- Sync and build again.
Check a log that shows this
Paste the failing step into the build error explainer. It matches this message, and any others in the same log, in your browser. Nothing is uploaded.
