idea2017等低版本引入okhttp4无法编译运行

pom引入okhttp4.x以前的版本idea可以正常编译运行,升级到okhttp4.x后,无法编译运行

因为OkHttp 4.x将我们的实现语言从Java升级到Kotlin,并使其他所有内容保持不变。我们选择Kotlin是因为它在与Java紧密集成的同时为我们提供了强大的新功能。

解决方式:

1、选中菜单的file,选择setting,kotlin update


2、选中菜单的file,选择project structure=>Modules=>选中项目=>点击加号,加上Kotlin

参考文档:

http://www.jetbrains.com/help/idea/kotlin.html

https://blog.csdn.net/wangyuanjiet/article/details/81220987

https://blog.csdn.net/u014543264/article/details/102652637

https://square.github.io/okhttp/upgrading_to_okhttp_4/

发布了233 篇原创文章 · 获赞 7 · 访问量 5万+

猜你喜欢

转载自blog.csdn.net/china_squirrel/article/details/103157193