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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by moooni moon
, 1 year ago
com.google.gson.Gson.getAdapter(Lcom/google/gson/reflect/TypeToken;)Lcom/google/gson/TypeAdapter;
java.lang.NoSuchMethodError: com.google.gson.Gson.getAdapter
at retrofit2.converter.gson.GsonConverterFactory.responseBodyConverter(GsonConverterFactory.java:63)
at retrofit2.Retrofit.nextResponseBodyConverter(Retrofit.java:325)
at retrofit2.Retrofit.responseBodyConverter(Retrofit.java:308)
at retrofit2.ServiceMethod$Builder.createResponseConverter(ServiceMethod.java:704)
at retrofit2.ServiceMethod$Builder.build(ServiceMethod.java:167)
at retrofit2.Retrofit.loadServiceMethod(Retrofit.java:166)
at retrofit2.Retrofit$1.invoke(Retrofit.java:145)
at undefined.$Proxy0.getJSON(Native Method)
at oerrride.we.huzykamz.newsfeed.MainActivity.loadJSON(MainActivity.java:87)
at oerrride.we.huzykamz.newsfeed.MainActivity.initViews(MainActivity.java:72)
at oerrride.we.huzykamz.newsfeed.MainActivity.onCreate(MainActivity.java:60)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Know the solutions? Share your knowledge to help other developers to debug faster.