Home » Android » android – Cannot Resolve Symbol Manifest.permission.READ_PHONE_STATE

android – Cannot Resolve Symbol Manifest.permission.READ_PHONE_STATE

Posted by: admin May 14, 2020 Leave a comment

Questions:

I am implementing runtime permission request for Marshmallow devices. I have set my build and compile sdk to API 23. Still Manifest.permission.READ_PHONE_STATE is not recognizable

How to&Answers:

I had imported wrong package, the right package is

android.Manifest

Answer:

check this

As in 23 sdk you can not use dangerous permission directly from manifest you have do rum time programming for this else drop down your target sdk to 22.
List of dangerous permissions