添加目标 jvm 后 build.gradle android 处出错

Error at build.gradle android after adding target jvm

我收到这样的错误:

Duplicate class com.tinder.scarlet.Deserialization found in modules jetified-scarlet-core-0.1.10.jar (com.github.tinder.scarlet:scarlet-core:0.1.10) and jetified-scarlet-core-0.1.10.jar (com.tinder.scarlet:scarlet-core:0.1.10)

添加这些行后我开始收到此错误:

kotlinOptions {
    jvmTarget = '1.8'
}

我在 build.gradleandroid 范围。所有这些行动都是为了解决这个问题:

Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6

我在这一行看到的这个问题:

val myService = scarlet.create<MessageService>() // word create was highlighted

我的 gradle 实现:

implementation 'com.tinder.scarlet:scarlet:0.1.10'
implementation 'com.github.tinder.scarlet:scarlet-message-adapter-moshi:0.1.10'
implementation 'com.github.tinder.scarlet:scarlet-stream-adapter-rxjava2:0.1.10'
implementation 'com.github.tinder.scarlet:scarlet-websocket-okhttp:0.1.10'

也许我以错误的方式解决了这个问题,我必须使用其他解决方案?

Duplicate class com.tinder.scarlet.Deserialization found in modules jetified-scarlet-core

请更改版本

implementation 'com.tinder.scarlet:scarlet:0.1.9' // or 0.1.7

阅读Duplicate dependency compilation error