android ContextCompat.checkSelfPermission() not found

前端 未结 3 635
生来不讨喜
生来不讨喜 2020-12-15 04:37

I am trying to make runtime permissions backward compatible with older devices but using the support library i cant find checkSelfPermission() static call in

3条回答
  •  一向
    一向 (楼主)
    2020-12-15 05:16

    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'

提交回复
热议问题