HoneyMoose
  • 首页
  • Java
  • Jersey
  • Jira
  • Confluence
  • U.S.
    • USRealEstate
    • USVisaTrack
    • H1B
  • 项目和网站
    • CWIKI.US
    • OSSEZ 社区
    • WIKI.OSSEZ.COM
    • BUG.OSSEZ.COM
    • RSS.OSSEZ.COM
BLOG.OSSEZ.COM
A responsive blog theme focused om user reading experience
  1. Home
  2. Computer Science
  3. This article

Okhttp 的 retrofit2 运行警告信息异常

2023年03月10日 46Browse 0Like 0Comments

最近在使用一个 okhttp 的项目运行的时候得到下面的警告信息。

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by retrofit2.Platform (file:/C:/Users/yhu/.m2/repository/com/squareup/retrofit2/retrofit/2.9.0/retrofit-2.9.0.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of retrofit2.Platform
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

 

2023-03-10_13-30-15

 

针对这个问题,已经有官方的说明, 说明的地址为:Illegal reflective access · Issue #3341 · square/retrofit · GitHub

解决办法

我们可以有下面的一些解决方案:

  1. 可以持续使用 Retrofit 2.8.x 或者更新的版本,或者你可以使用 JDK 17 的版本。
  2. 如果你不想升级 JDK 版本的话,你可以继续使用 Retrofit 2.7 版本来避免这个问题。

https://www.ossez.com/t/okhttp-retrofit2/14340

Tags: None
Last updated:2023年03月10日

Kratos

stay absorbed stay excellent

Like
< Previous
Next >

Comments

Cancel reply

Newest Hotspots Random
Newest Hotspots Random
经过小折腾,可算是把 Code Coverage API 用上了 Docker 开始清退开源组织,不付费就删除所有私镜像怎么看 IBM Semeru Windows 下的安装 JDK 17 Okhttp 的 retrofit2 运行警告信息异常 应该升级 JDK 到 17 了吗 OpenAI-J 如何进行测试
微信 API 的发送客服消息返回对象不正确OpenAI-J 如何进行测试应该升级 JDK 到 17 了吗Okhttp 的 retrofit2 运行警告信息异常IBM Semeru Windows 下的安装 JDK 17Docker 开始清退开源组织,不付费就删除所有私镜像怎么看
Hibernate 如何生成 JPA 的 Metamodel 美国申请房贷的流程有什么 Confluence 删除的页面会完全删除吗 Docker 文档编译 - 运行页面中的 Javascript Discourse 新用户可插入媒体的数量 CentOS 8 如何安装 htop
Categories
  • Algorithm(算法)
  • AMQP
  • Angular
  • CI
  • Compile And CI
  • Computer Science
  • Confluence
  • DataBase
  • Gradle
  • H1B
  • Hibernate
  • IDE
  • Java
  • Jersey
  • Jira
  • MariaDB
  • PrestaShop
  • Spring
  • Spring Batch
  • U.S.
  • USRealEstate
  • USVisaTrack
  • 我的小厨

COPYRIGHT © 2020 HoneyMoose. ALL RIGHTS RESERVED.

THEME CWIKIUS.CN MADE BY VTROIS