kotest: Duplicate class org.junit.platform.commons.annotation.Testable found in modules junit-platform-commons-1.4.0.jar (org.junit.platform:junit-platform-commons:1.4.0) and kotlintest-core-3.3.0.jar (io.kotlintest:kotlintest-core:3.3.0)
Hi I’m new in Android and I’m trying to run some test.
But when I try to use kotlintest I get the following error:
Duplicate class org.junit.platform.commons.annotation.Testable found in modules junit-platform-commons-1.4.0.jar (org.junit.platform:junit-platform-commons:1.4.0) and kotlintest-core-3.3.0.jar (io.kotlintest:kotlintest-core:3.3.0)
This is my dependencies in gradle:
def grpcVersion = '1.22.1' // CURRENT_GRPC_VERSION
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:preference-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'org.nield:kotlin-statistics:1.1.3'
implementation 'org.tensorflow:tensorflow-android:+'
implementation 'com.android.support:multidex:1.0.3'
implementation "org.jetbrains.anko:anko-commons:0.10.8"
compileOnly "javax.annotation:jsr250-api:1.0"//This fixes the problem with Generated symbols
// You need to build grpc-java to obtain these libraries below.
implementation "io.grpc:grpc-okhttp:${grpcVersion}" // CURRENT_GRPC_VERSION
implementation "io.grpc:grpc-protobuf-lite:${grpcVersion}" // CURRENT_GRPC_VERSION
implementation "io.grpc:grpc-stub:${grpcVersion}" // CURRENT_GRPC_VERSION
implementation 'com.google.code.gson:gson:2.8.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
//Testing framework
androidTestImplementation 'io.kotlintest:kotlintest-runner-junit5:3.3.0'
//Mocking framework
androidTestImplementation "io.mockk:mockk:1.9.3"
}
Thanks
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (11 by maintainers)
Commits related to this issue
- Remove JUnit redeclarations These declarations, although they would reduce the amount of dependencies in our artifacts, were causing issues with other libraries, such as Espresso from Android. These... — committed to kotest/kotest by LeoColman 5 years ago
- Remove JUnit redeclarations (#944) These declarations, although they would reduce the amount of dependencies in our artifacts, were causing issues with other libraries, such as Espresso from Android.... — committed to kotest/kotest by LeoColman 5 years ago
Fyi until 3.5 is available the snapshot with fix for this is
3.5.0.2421-SNAPSHOT