当我使用OkHttp版本4.0.0-RC1用Ant编译代码时,我看到警告和错误:
[javac] warning: unknown enum constant DeprecationLevel.WARNING
[javac] warning: unknown enum constant DeprecationLevel.ERROR
[javac] warning: unknown enum constant DeprecationLevel.ERROR
[javac] /Users/janne/work/github/pureload/pureit/packages/purehttp/src/com/pureload/net/http/impl/okhttp/HeaderUtil.java:51: error: cannot access KMappedMarker
[javac] Set<String> headerNames = headers.names();
[javac] ^
[javac] class file for kotlin.jvm.internal.markers.KMappedMarker not found
[javac] warning: unknown enum constant DeprecationLevel.ERROR
...
我只是用最新的4.0.0-RC1替换了3.12.1版中的OkHttp jar文件。我正在使用Java 11。
我认为这与Kotlin有关(?),但我不知道该如何解决...