嗨,我是Android新手,正在尝试进行一些测试。
但是当我尝试使用kotlintest时,出现以下错误:
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)
这些是我对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}"
}
知道我在做什么错吗?
谢谢