How to Fix Cannot resolve method “checkSelfPermission” Error in Java Android Studio
This error can cause sometimes in the android development because some build-tools error or support library issues.
I cannot clearly explain a reason for this error but the code below helped.
If you face this issue, first try to rebuild your project, also try to sync your project with gradle files, if that does not help, try this code below
If you are checking permission with ContextCompat.checkSelfPermission,
Replace it with
This should fix the error