Open ghahramani opened 5 months ago
Are you using -Xjvm-default=all
in your Kotlin compiler flags? Retrofit should ignore any method that has a default implementation, but it needs to be a default as seen by Java's reflection. Since Kotlin used to target versions of the JVM older than 8, it has a compatibility mode for doing its default functions as rendered in bytecode.
You would also annotate each one with @JvmDefault
, but that's a bit archaic nowadays with 8 being everyone's minimum (if not even higher).
I used @JvmDefault
but did not work and also it is deprecated, I did not use Xjvm-default=all
I have multiple interfaces for different external services which some of interfaces are implemented via Retrofit and some have a custom implementation. Therefore, I needed to put a base interface as the contract for all clients. Here is the example
and the retrofit interface is
I am encountering this error
is there a way to just add a
@Ignore
annotation and tell to retrofit ignores the methods that are not annotation with http verb annotations? something like the below