Make sure your context is set to your activity in tools name space in layout.
Make sure the classes you’re opening in intent are registered activities in your package.
5
solved OnClick not working, “Could not execute method for android:onClick” What is it? [closed]