android ContextCompat.checkSelfPermission() not found
checkSelfPermission()
didn't get introduced into the native Context
until API 23. So you will need to use at least version 23.0.0 of the support library.
You should change this
compile 'com.android.support:appcompat-v7:22.1.1'
to this
compile 'com.android.support:appcompat-v7:23.0.1'
If you have migrated from eclipse adding the below line wont work
compile 'com.android.support:appcompat-v7:23.0.1'
While migrating, it adds appcompatv4 as an external dependent library. Make sure you have deleted the appcompatv4 library from the libs folder and then it should start working