public void onResponse(Call<User> call, Response<User> response) {
waitingDialog.dismiss();
User user = response.body();
if (TextUtils.isEmpty(user.getError_msg())) {
Toast.makeText(MainActivity.this, "User has been registered successfully.", Toast.LENGTH_SHORT).show();
//start new activity.
}
}
//和logcat是:java.lang.NullPointerException:尝试在空对象引用上调用虚拟方法'java.lang.String com.example.asus.drinksdeliverysystem.Model.User.getError_msg()'