Closed NG-Gaurav closed 8 months ago
Thank you everyone proguard rules were effective
I had an issue and I've applied all of the rules in addition to my custom CallAdapterFactory
rules but it didn't work. The issue with my project was the deprecated Retrofit Coroutines Adapter which was deprecated. I removed it and it fixed my problem.
Hope it helps!
For ones who need this support, you can try out my fork, use io.github.goooler.retrofit2:retrofit:2.10.0
, check https://github.com/Goooler/retrofit/releases/tag/2.10.0
Just a small note:
If you are developing a library/sdk, make sure to have the above-mentioned rules applied inside of consumer-rules.pro
.
Closing since the fix was merged. Will be included in the next release.
(https://github.com/square/retrofit/issues/3751#issuecomment-1192043644) Thanks @marcoscostaanddev ] , adding these rules into my proguard , helped me fixing this (https://github.com/square/retrofit/issues/3751#top).
Accessing hidden method Ljava/security/spec/ECParameterSpec;->setCurveName(Ljava/lang/String;)V (greylist, reflection, allowed) 16:09:29.013 W java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType 16:09:29.014 W at retrofit2.HttpServiceMethod.parseAnnotations(SourceFile:46) 16:09:29.014 W at retrofit2.ServiceMethod.parseAnnotations(SourceFile:39) 16:09:29.014 W at retrofit2.Retrofit.loadServiceMethod(SourceFile:202) 16:09:29.014 W at retrofit2.Retrofit$1.invoke(SourceFile:160) 16:09:29.014 W at java.lang.reflect.Proxy.invoke(Proxy.java:1006) 16:09:29.014 W at $Proxy6.generateAnonymousAuthTokenAsyn(Unknown Source)