大家帮忙一下代码,为什么按文档这样写数据上传不上去,AVOSCloud.initialize(Information.this,
"yme31y33jhtn5gck3qw3fte7rvo79uny5wogbttlvp3xzpqd",
"3uu4cwmch217nq0747xk84rb9cz8u8f1ve551pqvu4w3thu8");
objectId = getIntent().getStringExtra("objectId");
nameEditText = (EditText) findViewById(R.id.name_edit);
ageEditText = (EditText) findViewById(R.id.age_edit);
schoolEditText = (EditText) findViewById(R.id.school_edit);
signEditText = (EditText) findViewById(R.id.sign_edit);
nextButton = (Button) findViewById(R.id.next_button);
manRadioButton = (RadioButton) findViewById(R.id.man_radio);
womenRadioButton = (RadioButton) findViewById(R.id.women_radio);
// 下一步按钮上传信息
String tableName = "_User";
AVObject information = new AVObject(tableName);
AVQuery<AVObject> query = new AVQuery<AVObject>(tableName);
information.put("school", "xr");
try {
information=query.get("54f70afde4b00e6414f7233c");
} catch (AVException e1) {
e1.printStackTrace();
}
information.saveInBackground(new SaveCallback() {
@Override
public void done(AVException e) {
if (e == null) {
Log.i("LeanCloud", "Save successfully.");
} else {
Log.e("LeanCloud", "Save failed.");
}
}
});
而且报出NetWorkOnMainThreadException这样的错误
-
创建时间
15年3月4日
-
最后回复
15年4月18日
-
2
回复
-
1.2K
浏览
-
3
用户