为了账号安全,请及时绑定邮箱和手机立即绑定

为什么我都是显示提交失败呢?

这里提个事情(之前一点提交直接崩了,原因找到了希望对大家有帮助,问题出在public class Feedback extends BmobUser,之前用老师的BmobObject,改成BmobUser就不崩了,但是是提交失败)(下面是报错的内容 Caused by: java.lang.IncompatibleClassChangeError: cn.bmob.v3.request.thing)(Caused by: java.lang.reflect.InvocationTargetExceptionat java.lang.reflect.Method.invoke(Native Method)

public class Register extends Activity {
   @InjectView(R.id.register_account) EditText mRegister_account;
   @InjectView(R.id.register_password) EditText mRegister_password;
   @InjectView(R.id.second_register_password) EditText mSecond_Register_password;

   protected void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       requestWindowFeature(Window.FEATURE_NO_TITLE);
       setContentView(R.layout.register);
       Bmob.initialize(Register.this, "4abc415ca666a3fa6301ad90a0d2fa8d");
       ButterKnife.inject(this);
       mRegister_password.setFilters(new InputFilter[]{new InputFilter.LengthFilter(16)});
       mRegister_password.setTransformationMethod(PasswordTransformationMethod.getInstance());
       mSecond_Register_password.setFilters(new InputFilter[]{new InputFilter.LengthFilter(16)});
       mSecond_Register_password.setTransformationMethod(PasswordTransformationMethod.getInstance());

   }
public void submit(View view){
   String account=mRegister_account.getText().toString();
   String password=mRegister_password.getText().toString();
   String password_again=mSecond_Register_password.getText().toString();
   if (account.equals("")||password.equals("")||password_again.equals("")){
       return;
   }
   Feedback feedbackObj =new Feedback();
   feedbackObj.setAccount(account);
   feedbackObj.setPassword(password);
   feedbackObj.setPassword_again(password_again);
   feedbackObj.save(this, new SaveListener() {
       @Override
       public void onSuccess() {
           Toast.makeText(Register.this,"submit success",Toast.LENGTH_LONG).show();
       }

       @Override
       public void onFailure(int i, String s) {
           Toast.makeText(Register.this,"submit failed",Toast.LENGTH_LONG).show();
       }
   });
}
}




import cn.bmob.v3.BmobUser;

/**
* Created by Administrator on 2016/6/16.
*/
public class Feedback extends BmobUser {
   private String account;
   private String password;
   private String password_again;

   public String getPassword() {
       return password;
   }

   public void setPassword(String password) {
       this.password = password;
   }

   public String getAccount() {
       return account;
   }

   public void setAccount(String account) {
       this.account = account;
   }

   public String getPassword_again() {
       return password_again;
   }

   public void setPassword_again(String password_again) {
       this.password_again = password_again;
   }


}

http://img1.sycdn.imooc.com//5762b7120001755003990608.jpg

正在回答

举报

0/150
提交
取消
创建Android后端服务之Bmob
  • 参与学习       26193    人
  • 解答问题       98    个

服务器端对于移动开发者不再是苦恼,快快学起来吧

进入课程

为什么我都是显示提交失败呢?

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信