-1

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.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Sebastjan
  • 71
  • 1
  • 2
  • 8

2 Answers2

3

requestPermissisons should be requestPermissions

cyberdanes
  • 56
  • 2
0

There is a TYPO

its ActivityCompat.requestPermissions not ActivityCompat.requestPermissisons

Try this

 ActivityCompat.requestPermissions(this,new String[]{ACCESS_FINE_LOCATION,ACCESS_COARSE_LOCATION},0);
AskNilesh
  • 67,701
  • 16
  • 123
  • 163