java.lang.NullPointerException: Attempt to invoke virtual method android

后端 未结 2 657
甜味超标
甜味超标 2021-01-07 01:56

i am a beginner in the android, and i dont know what is the problem in my code ! and i need your help, this is my code: i am trying to do a calculator = - / * ..... and i re

2条回答
  •  有刺的猬
    2021-01-07 02:34

    Either check you have initialized the view or may be layout not has been attached to activity.

        password = (EditText) findViewById(R.id.password);
    

    or

    setContentView(R.layour.login_screen);
    

提交回复
热议问题