Problem is you are setting wrong layout in your UserLogin Activity.
You are setting activity_main.xml instead you need to set your UserLogin Activity layout XML file .
You are doing like this
setContentView(R.layout.activity_main);
Instead you need to do like
setContentView(R.layout.YOUR_USER_LOGIN_ACTIVITY_LAYOUT);
8
solved Intent throwing error in click listener in Android Studio