0
votes

I'm working on an app which fetches data from server using JSON. It is working fine in emulator but in my phone, it is giving error and not getting data.

The error comes at this point in JSON Parser....

HttpPost httpPost = new HttpPost(url); httpPost.setEntity(new UrlEncodedFormEntity(params)); HttpResponse httpResponse = httpClient.execute(httpPost);//Error Point httpEntity = httpResponse.getEntity();

On the third line logcat shows....

SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length

I have searched a lot but it doesn't help me.

1

1 Answers

0
votes

check your string.lenght() it should not 0 .