Volley JSONException: End of input at character 0 of

前端 未结 5 1775
-上瘾入骨i
-上瘾入骨i 2020-12-29 23:43

I\'ve seen others come across this problem, but none of the posts have been able to assist me. I\'m attempting to use Volley for my REST call library, and when I\'m attempti

5条回答
  •  情歌与酒
    2020-12-29 23:54

    You need to check if the server response is not empty. Maybe it could be a emtply String "".

            if (response.success()) {
                if (response.getData() == null) {
                    return null;
                } else if (response.getData().length() <= 0){
                    return null;
                }
    
               // Do Processing
                try {
    

提交回复
热议问题