我正在为Android编写一个应用程序,所有的应用程序在我的Android 4.1上运行正常,但是当我在我的其他Android 2.2上测试时,除了表单之外一切正常,当你点击按钮发送表单的应用程序崩溃.
我试过评论不同的代码,我在if-else中发现了问题,但我不知道为什么我希望你能帮助我.
此代码发送表单:
private void createAccount(){
EditText nombre = (EditText) findViewById(R.id.name);
EditText mail = (EditText) findViewById(R.id.mail);
EditText tel = (EditText) findViewById(R.id.phone);
EditText pass = (EditText) findViewById(R.id.pass);
EditText pass2 = (EditText) findViewById(R.id.pass2);
name = nombre.getText().toString();
email = mail.getText().toString();
phone = tel.getText().toString();
pas = pass.getText().toString();
pas2 = pass2.getText().toString();
if(name.isEmpty() == false && email.isEmpty() == false && phone.isEmpty() == false && pas.isEmpty() == false && pas2.isEmpty() == false){
if(pas.equals(pas2)){
respTxt = Cloud.CreateAccout(phone, name, email, pas, tel_id, tel_oper, tel_country);
TextView alert = …
Run Code Online (Sandbox Code Playgroud)