我是Symfony的新手,我克隆了实际工作的项目。当我在VM上启动命令 Button setpassword = findViewById(R.id.setpasswordButton);
Button checkpassword = findViewById(R.id.checkpasswordButton);
final EditText passwordinput = findViewById(R.id.passwordinput);
final TextView result = findViewById(R.id.result);
final String thepassword = "1";
setpassword.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
final String thepassword = passwordinput.getText().toString();
}
}
);
checkpassword.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
final String checkpassword = passwordinput.getText().toString();
if (Objects.equals(checkpassword, thepassword)) {
result.setText("right");
} else {
result.setText("wrong");
}
}
});
时,出现以下错误:1。
感谢您的帮助。