Cannot find symbol method requestPermissisons [duplicate]


Cannot find symbol method requestPermissisons [duplicate]



This question already has an answer here:



I'm trying to write a method where I get the user's current location. If I try to run:


ActivityCompat.requestPermissisons(this,new String{ACCESS_FINE_LOCATION,ACCESS_COARSE_LOCATION},0);



I get an error saying:



cannot find symbol method
requestPermissisons(MainActivity,String,int)



I made sure I imported ActivityCompat at the beginning.



This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.




2 Answers
2



There is a TYPO



its ActivityCompat.requestPermissions not ActivityCompat.requestPermissisons


ActivityCompat.requestPermissions


ActivityCompat.requestPermissisons



Try this


ActivityCompat.requestPermissions(this,new String{ACCESS_FINE_LOCATION,ACCESS_COARSE_LOCATION},0);



requestPermissisons should be requestPermissions

Popular posts from this blog

api-platform.com Unable to generate an IRI for the item of type

PHP contact form sending but not receiving emails

Do graphics cards have individual ID by which single devices can be distinguished?