答案 0 :(得分:0)
您尚未设置editSecond,然后两次错误地设置了editFirst:
editFirst = (EditText) findViewById(R.id.editfirst)
editFirst = (EditText) findViewById(R.id.editsecond)//<-here you are setting editfirst instead of editSecond change it
editSecond = (EditText) findViewById(R.id.editsecond)//<- change above line to this
答案 1 :(得分:0)
editsecond
(第32行)为空,因为您复制粘贴了editfirst=(EditText) findById(R.id.editfirst)
,但忘记了重命名变量(第21行)。