java.lang.IllegalArgumentException

Service methods cannot return void. for method MyApiRequestInterface.getJson

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web31

  • via Stack Overflow by Fidelis
    ,
  • via GitHub by gushoubang
    ,
  • Stack trace

    • java.lang.IllegalArgumentException: Service methods cannot return void. for method MyApiRequestInterface.getJson at retrofit2.ServiceMethod$Builder.methodError(ServiceMethod.java:720) at retrofit2.ServiceMethod$Builder.methodError(ServiceMethod.java:711) at retrofit2.ServiceMethod$Builder.createCallAdapter(ServiceMethod.java:228) at retrofit2.ServiceMethod$Builder.build(ServiceMethod.java:160) at retrofit2.Retrofit.loadServiceMethod(Retrofit.java:166) at retrofit2.Retrofit$1.invoke(Retrofit.java:145) at java.lang.reflect.Proxy.invoke(Proxy.java:397) at $Proxy1.getJson(Unknown Source) at it.uniba.di.ivu.sms16.gruppo26.it.andriasmart.Fragment.BusFragment.using_retrofit(BusFragment.java:369) at it.uniba.di.ivu.sms16.gruppo26.it.andriasmart.Fragment.BusFragment$7$1$2.onMarkerClick(BusFragment.java:323) at com.google.android.gms.maps.GoogleMap$15.zzd(Unknown Source) at com.google.android.gms.maps.internal.zzp$zza.onTransact(Unknown Source) at android.os.Binder.transact(Binder.java:395)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Indri YunitaIndri Yunita
    3 times, last one
    filpgamefilpgame
    2 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Diogo JaymDiogo Jaym
    2 times, last one
    4 more bugmates