混淆前运行正常,混淆后网络请求失败,请求报错:
HTTP method annotation is required (e.g., @GET, @POST, etc.)
在retrofit源码目录有人反馈,但是没有很好的答案:https://github.com/square/retrofit/issues/1448
stackoverflow上有个模糊的答案,但是不知道怎么操作: https://stackoverflow.com/questions/60047632/retrofit-http-method-annotation-is-required
看样子只能自己动手了
分析问题:
retrofit是一个广泛使用的库,本身应该不会有这么严重的问题。这个问题一点有解。
于是进行了一下解决尝试
通过对比和调试,最终发现是定义的网络接口,不能有其他方法和定义。
把网络请求接口清理干净,问题解决。