java.lang.NullPointerException: Attempt to invoke virtual method 'int android.content.Context.checkPermission(java.lang.String, int, int)' on a null object reference code example
Example: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference
Null pointer try to say that the textview is null. That can happen beacause the findviewbyid is not matching with the right one on your xml.
Be sure your id matches on your xml and java file