Fix Cannot resolve method “checkSelfPermission” Error in Android

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 PermissionChecker.checkSelfPermission

This should fix the error

Leave a Reply

Your email address will not be published.