error: package PermissionUtils does not exist

后端 未结 2 761
南笙
南笙 2021-01-23 17:55

I want to find the current location of the user through my app and I copied the source code from Github and I don\'t know it does not give me any error but this one. Here\'s my

2条回答
  •  不要未来只要你来
    2021-01-23 18:23

    You can use ActivityCompat instead:

    ActivityCompat.requestPermission(this, LOCATION_PERMISSION_REQUEST_CODE,
                    Manifest.permission.ACCESS_FINE_LOCATION, true);
    

提交回复
热议问题