Error "failure in processEncodedAnnotation"

android
fabric
twitterkit
embeddedtimeline

#1

I’m trying to embed my timeline in my app, but I always receive this error:

E/Twitter: API call failure.
com.twitter.sdk.android.core.TwitterApiException: failure in processEncodedAnnotation
at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:395)
at retrofit.RestAdapter$RestHandler.access$100(RestAdapter.java:220)
at retrofit.RestAdapter$RestHandler$2.obtainResponse(RestAdapter.java:278)
at retrofit.CallbackRunnable.run(CallbackRunnable.java:42)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
at java.util.concurrent.FutureTask.run(FutureTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:841)

This is an extract of the code I’m using:

                final UserTimeline userTimeline = new UserTimeline.Builder()
                        .screenName("fabric")
                        .build();
                final TweetTimelineListAdapter adapter = new TweetTimelineListAdapter.Builder(getContext())
                        .setTimeline(userTimeline)
                        .build();
                refreshListViewTw.setAdapter(adapter);

EDIT:

In Marshmallow this is the error:

E/Twitter: API call failure.
com.twitter.sdk.android.core.TwitterApiException: Couldn’t find com.google.gson.annotations.SerializedName.alternate
at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:395)
at retrofit.RestAdapter$RestHandler.access$100(RestAdapter.java:220)
at retrofit.RestAdapter$RestHandler$2.obtainResponse(RestAdapter.java:278)
at retrofit.CallbackRunnable.run(CallbackRunnable.java:42)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)

Do you have any idea why I’m receiving this error? Thank you so much!


#2

Thanks for reaching out on this @spawn150, is this happening on each run of the app. Also, what build tool are you using?


#3

Hi, I’ve solved. It was an issue due to a different version of Gson Library used by one of our libraries imported into our project.

Thanks.


#4

Thanks for letting me know and happy coding!


#5