【发布时间】:2018-04-30 10:37:41
【问题描述】:
我有一个非常简单的 Android 项目,它拒绝在 Android Studio 中构建,只是给了我这个神秘的错误消息:
Program type already present: okhttp3.Call$Factory
Message{kind=ERROR, text=Program type already present: okhttp3.Call$Factory, sources=[Unknown source file], tool name=Optional.of(D8)}
这是我的依赖项:
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'net.openid:appauth:0.7.0'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation files('libs/easywsdl/ksoap2-android-assembly-3.6.2-jar-with-dependencies.jar')
implementation files('libs/easywsdl/ExKsoap2-1.0.2.0.jar')
}
我该如何解决这个问题?
【问题讨论】:
标签: android android-studio android-gradle-plugin