程序类型已存在:okhttp3.身份验证器$1



我们使用 kiteconnect.jar lib 文件夹中的文件进行套接字连接。现在我正在应用程序中集成Instamojo支付网关,但在运行应用程序时出现此错误程序类型已存在:okhttp3。身份验证器$1 消息{kind=ERROR,文本=程序类型已存在:okhttp3。身份验证器$1,源=[未知源文件],工具名称=可选.of(D8(}

提取KiteConnect后.jar文件在其中找到了okhttp3接口。 现在我不知道如何处理这个问题。 请帮帮我

若要解决依赖项冲突,请添加配置。

configurations {
all*.exclude group: 'com.squareup.okhttp3', module: 'okhttp'
}

使用 Android Studio "3.1.3",看起来您不再需要将 okhttp3 显式添加到项目的 gradle 中。尝试从 build.gradle 中删除所有 okhttp3 行。然后同步您的项目以查看一切是否正常。

implementation 'com.squareup.okhttp3:okhttp:3.11.0'
implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.0.0'

它对我有用。这是我的Android Studio版本详细信息:Android Studio 3.1.3
Build #AI-173.4819257,构建于2018
年6月4日 JRE:1.8.0_152-release-1024-b02 amd64 JVM:
OpenJDK 64-bit
Server VM by JetBrains s.r.o

最新更新