I have some code that when I run it returns a null pointer error. This is the code and error from the logcat:
import android.support.v7.app.AppCompatActivity; im
In your Layout, you say:
android:onClick="onClick"
It appears that you did not include all of the code for the Activity but I'd bet that it does not define a method named onClick
onClick
All you need to do is define the method.