W/System.err: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 2 path $
at com.google.gson.Gson.fromJson(Gson.java:944)
at com.google.gson.Gson.fromJson(Gson.java:897)
at com.google.gson.Gson.fromJson(Gson.java:846)
at com.example.administrator.woleme.shop_list.parseJSON(shop_list.java:93)
at com.example.administrator.woleme.shop_list.access$000(shop_list.java:30)
at com.example.administrator.woleme.shop_list$1
AsyncCall.run(RealCall.kt:504)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
W/System.err: Caused by: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 2 path $
at com.google.gson.stream.JsonReader.beginArray(JsonReader.java:351)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory
Adapter.read (CollectionTypeAdapterFactory.java:61)
at com.google.gson.Gson.fromJson (Gson.java:932)
Solution: Checked a lot of information on the external network, some people said that it can be solved by cleaning the project, but my program still does not run normally, and then I saw a solution to Expected BEGIN_OBJECT but was STRING on Stack Overflow. I received it. Inspiration
I added two lines of code to my program
and then solved it. I hope to inspire you