on click android studio not working

Java
//onClick not working in android studio
//You can try

setContentView(R.layout.activity_my);


Source

Also in Java: