It reads and writes fine from the database but gives the JSONException error.
Any help would be greatly appreciated!
Thank you
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This error happens in getter functions of a
JSONObjectand it means that you are trying to retrieve a value from the JSONObject using an id that doesn’t exist in the JSONObject. Before retrieving a value, check if it actually exists in theJSONObjectby thehas(String name)method or using the opt methods. For more information about theJSONObjectclass see here.EDIT From your error log, the error triggers in a
getStringmethod inside theOnClickListenerof yourButtonnamedbtnRegister.