首页 > 解决方案 > Android上的okhttp3问题

问题描述

我们将 Expo-ejected 应用程序升级到 ExpoKit 31,升级指南说要添加

implementation('host.exp.exponent:expoview:31.0.0@aar') {
  transitive = true
  exclude group: 'com.squareup.okhttp3', module: 'okhttp'
  exclude group: 'com.squareup.okhttp3', module: 'okhttp-urlconnection'
}

在构建应用程序时,我们收到以下错误:

任务:app:transformDexArchiveWithExternalLibsDexMergerForDevMinSdkDevKernelDebug FAILED D8:程序类型已经存在:okhttp3.internal.ws.RealWebSocket

你知道我们如何解决这个问题吗?

标签: react-nativegradleexpo

解决方案


他们添加了一些信息。具体要删除:

implementation 'com.squareup.okhttp3:okhttp:3.4.1'
implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.4.1'
implementation 'com.squareup.okhttp3:okhttp-ws:3.4.1'

检查这个:https ://docs.expo.io/versions/latest/expokit/expokit#upgrading-expokit


推荐阅读