In my application, I created two activities. In activity1, I created a button, set event:

activity2, I created, and write in manifest:

when i click to the button in activity1, error was throw:

Why? Please explain to me. Thank you
I expect activity2 to run when I click the button
I had find issue in your code. Inside Click event of button change as per below. use startActivityForResult() instead of startActivity().
It will works.