Closed jippylong12 closed 7 years ago
Hi @jippylong12,
Thanks for using StravaZpot. It would be helpful for us if you paste here the JSON you are receiving from Strava. You can look for it in the LogCat. It seems there is some case where an array is expected, but the contents of the JSON is a single object; therefore, it crashes. Let us know and we'll fix the issue.
I have attached the response I am getting. Thank you. stravaError.txt
The issue has been fixed and a new library version (1.1.3) has been published. Please, update your Gradle file to get this new version and see if everything has been solved. If so, you can close the issue. Let us know if you face any other issue and thanks for contributing!
Thanks for the quick turn around! It works!
I am trying to access the Segments part of the API, specifically the exploreSegementsInRegion, and I believe I have it set up correctly, but I am getting an error as such:
java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $
As far as I know, it is not an issue with my code. Really all I have so far is what is shown in the Readme(which is well done by the way).
I know that I get back a response because I can see it in Android Monitor, but I think when it is trying to convert it to the List it is throwing an error.
The boyd of my function looks like this
That code is in the doInBackground section of an AsyncTask, but I again I believe that is all correct to my knowledge.
The first three lines of the traceback are:
at com.google.gson.stream.JsonReader.beginArray(JsonReader.java:350) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:80) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61)
Let me know if you need anymore information and thank you.