java.lang.NoSuchMethodError: com.google.gson.Gson.getAdapter

GitHub | huxaiphaer | 4 months ago
  1. 0

    Not able to resolve java.lang.NoSuchMethodError with GSON library

    Stack Overflow | 10 months ago | moooni moon
    java.lang.NoSuchMethodError: com.google.gson.Gson.getAdapter(Lcom/google/gson/reflect/TypeToken;)Lcom/google/gson/TypeAdapter;
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0
    Put Jackson Java Module and Scala module in the same version.
    via GitHub by anujlal01
  4. 0
    Check if you didn't miss adding Jackson dependencies to your code.
    via GitHub by anujlal01

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      com.google.gson.Gson.getAdapter

      at retrofit2.converter.gson.GsonConverterFactory.responseBodyConverter()
    2. retrofit2.converter.gson
      GsonConverterFactory.responseBodyConverter
      1. retrofit2.converter.gson.GsonConverterFactory.responseBodyConverter(GsonConverterFactory.java:63)
      1 frame
    3. retrofit2
      Retrofit$1.invoke
      1. retrofit2.Retrofit.nextResponseBodyConverter(Retrofit.java:325)
      2. retrofit2.Retrofit.responseBodyConverter(Retrofit.java:308)
      3. retrofit2.ServiceMethod$Builder.createResponseConverter(ServiceMethod.java:704)
      4. retrofit2.ServiceMethod$Builder.build(ServiceMethod.java:167)
      5. retrofit2.Retrofit.loadServiceMethod(Retrofit.java:166)
      6. retrofit2.Retrofit$1.invoke(Retrofit.java:145)
      6 frames
    4. Unknown
      $Proxy0.getJSON
      1. $Proxy0.getJSON(Native Method)
      1 frame
    5. oerrride.we.huzykamz
      MainActivity.onCreate
      1. oerrride.we.huzykamz.newsfeed.MainActivity.loadJSON(MainActivity.java:87)
      2. oerrride.we.huzykamz.newsfeed.MainActivity.initViews(MainActivity.java:72)
      3. oerrride.we.huzykamz.newsfeed.MainActivity.onCreate(MainActivity.java:60)
      3 frames
    6. Android Platform
      ActivityThread.main
      1. android.app.Activity.performCreate(Activity.java:5231)
      2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
      3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
      4. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
      5. android.app.ActivityThread.access$800(ActivityThread.java:135)
      6. android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
      7. android.os.Handler.dispatchMessage(Handler.java:102)
      8. android.os.Looper.loop(Looper.java:136)
      9. android.app.ActivityThread.main(ActivityThread.java:5001)
      9 frames
    7. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invokeNative(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:515)
      2 frames
    8. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
      2 frames