Since you are not posting your logarithmic view, it is very difficult to understand where this problem is. I offer you a few things that you must make sure that they are in place, as he told me. If then do not correct them, and let me know if this will solve your problem or not.
First, you must make sure that you specify a button with the same identifier in the main.xml file. It will look something like this:
<button android:id="@+id/login_button" > </button>
Secondly, you must make sure to declare your Login.class in the AndroidManifest.xml file. It will look something like this:
<application> <activity android:name=".Login"></activity> </application>
Check if these things are in place or not.
source share