【问题标题】:Error on using SignUpCallback method使用 SignUpCallback 方法时出错
【发布时间】:2015-03-06 13:39:38
【问题描述】:

我尝试使用以下代码在我的 Parse.com 中创建新用户,但我的 Android Studio 不断收到错误消息:

ParseUser newUser=new ParseUser();
newUser.setPassword(password);
newUser.setUsername(username);
newUser.setEmail(email);
newUser.saveInBackground(new SignUpCallback() {
    @Override
    public void done(ParseException e) {
        if (e==null){
            Intent intent=new Intent(signUpActivity.this, MainActivity.class);
            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
            startActivity(intent);
        }else{
        }
    }
});

done() 方法出错:

(10:26) public abstract void done(com.parse.ParseException e); (方法 done(ParseException) 将具有与超级方法 SignUpCallback(ParseException) 不兼容的访问权限)

【问题讨论】:

    标签: android parse-platform


    【解决方案1】:

    要保存注册对象必须使用 signUpInBackground() 而不是 saveInBackground()

    【讨论】:

      猜你喜欢
      • 2010-12-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-09-20
      • 2014-06-10
      相关资源
      最近更新 更多