org.json.JSONException: End of input at character 0 of, android

后端 未结 2 954
伪装坚强ぢ
伪装坚强ぢ 2021-01-21 17:00

I am implementing an android app and trying to make a register and login screens. my app is connected to a server, here is the part my code that makes error:

pub         


        
2条回答
  •  孤独总比滥情好
    2021-01-21 17:36

    If you are using php to get the response, you should check on your php file. I had the same problem as you, i forgot to write the response on my php file. Below is part of my code that i forgot

    $response = new emp();
    $response->success = 1;
    $response->message = "Register success, please login.";
    die(json_encode($response)); 
    

提交回复
热议问题