将OkHttp日志拦截器升级到3.13.x及更高版本会中断android构建

时间:2019-04-16 19:31:44

标签: okhttp3

我正在尝试将OkHttp日志记录拦截器更新到3.13.x及更高版本。但是我遇到了这个构建错误。

Dex: Error converting bytecode to dex:
Cause: PARSE ERROR:
InvokeDynamic not supported
...while preparsing cst 0001 at offset 0000000a
...while parsing okhttp3/Authenticator.class

    PARSE ERROR:
    InvokeDynamic not supported
    ...while preparsing cst 0001 at offset 0000000a
    ...while parsing okhttp3/Authenticator.class

1 error; aborting

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithDexForProductionDebug'.
> com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: Unable to pre-dex '/Users/mvdev/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/okhttp/3.13.0/f53f6362226e4546c3987b8693f3d6976df8c797/okhttp-3.13.0.jar' to '/Users/mvdev/Developer/app/build/intermediates/transforms/dex/production/debug/folders/1000/10/okhttp-3.13.0_34a0ab9175b9c699b5f856a4c2b37e5f88f4690f'

我在3.12.2中没有这个问题。任何原因可能是什么问题?

0 个答案:

没有答案