我做了一个简单的注册用户界面只是为了检查解析但由于某种原因每次我尝试注册用户它给我这个错误
这是代码:
final ProgressDialog dlg = new ProgressDialog(this); dlg.setTitle("Please wait."); dlg.setMessage("Signing up. Please wait."); dlg.show(); String username_str = username.getText().toString(); String password_str = password.getText().toString(); String re_password_str = re_password.getText().toString(); String email_str = email.getText().toString(); String phone_str = phone.getText().toString(); if(!re_password_str.equals(password_str)){ dlg.dismiss(); Toast.makeText(this,"Passwords does not match!!",Toast.LENGTH_SHORT).show(); password.setText(""); re_password.setText(""); }else if(email_str.isEmpty()|| phone_str.isEmpty()){ dlg.dismiss(); Toast.makeText(this,"email or phone cannot be empty!!",Toast.LENGTH_SHORT).show(); }else { ParseUser new_user = new ParseUser(); new_user.setUsername(username_str); new_user.setPassword(password_str); new_user.setEmail(email_str); new_user.put("phone",phone_str); new_user.signUpInBackground(new SignUpCallback() { @Override public void done(ParseException e) { dlg.dismiss(); if(e == null){ Intent i = new Intent(SignupActivity.this,MainActivity.class); startActivity(i); }else{ Log.d("signup error",e.toString()); Toast.makeText(SignupActivity.this,e.toString(),Toast.LENGTH_SHORT).show(); } } });
我已经花了两天时间找到问题,但没有成功……