Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

One way to avoid the duplication of Kotlin class jetified-kotlin-stdlib-1.8.10 in Android (Java) is by using the exclude module option in the Gradle file. This option allows excluding specific modules from being included in the build process.

To exclude the Kotlin standard library module, add the following code to the Gradle file:

implementation('com.android.support:appcompat-v7:28.0.0') { 
   exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk7' 
}

This will exclude the kotlin-stdlib-jdk7 module from the appcompat-v7 library, which includes the Kotlin standard library.

Additionally, you can remove or update any other Kotlin dependencies in your project that may be causing conflicts or duplications. It's also helpful to check the dependencies tree to identify any overlapping or redundant libraries.