[Solved] Null object reference error when trying to open new activity on Android? [duplicate]


You need to initialize your button, you are calling OnClickListener on null reference

LoginButton  =(Button)findViewById(R.id.button_login);

Before calling LoginButton.setOnClickListener() initilize your login button.

6

solved Null object reference error when trying to open new activity on Android? [duplicate]