[Kotlin] Manifest.permission.ACCESS_FINE_LOCATION 오류 해결하기

코틀린에서 Manifest.permission.ACCESS_FINE_LOCATION 오류를 해결하는 방법에 대해 알아보도록 합시다.

Manifest.permission.ACCESS_FINE_LOCATION 오류 해결하기

Manifest.permission.ACCESS_FINE_LOCATION

Manifest 관련 임포트를 확인해 주세요. Manifest 임포트가 두 개 이상 존재하여 충돌하는 경우도 생각해 볼 수 있습니다. 어떠한 API를 사용하는지 점검하여 해결할 수 있답니다.

import android.Manifest

간혹 다음과 같이 오류 해결을 위한 권장사항이 나오기도 하는데, 판단하시어 해결해야 합니다.

  • Rename reference
  • Introduce local variable
  • Add clarifying parentheses
  • Add names in comment to call arguments
  • Expand boolean expression to 'if else'
  • Remove braces from all 'if' statements
  • Replace '&&' with '||'
  • Surround with widget
ACCESS_FINE_LOCATION
Added in API level 1 
public static final String  ACCESS_FINE_LOCATION
Allows an app to access precise location. Alternatively, you might want ACCESS_COARSE_LOCATION .
Protection level: dangerous
Constant Value: "android.permission.ACCESS_FINE_LOCATION"

  < Android API 33, extension level 3 Platform > (android.jar)
`ACCESS_FINE_LOCATION` on developer.android.com
public static final class Manifest.permission
extends Object

java.lang.Object
   ↳	android.Manifest.permission

ACCESS_FINE_LOCATION 

가장 많이 사용하는 로케이션 API 중 하나입니다.

  • ACCESS_FINE_LOCATION => 정확한 위치에 액세스 하도록 허용합니다. (Allows an app to access precise location)
  • ACCESS_COARSE_LOCATION => 앱이 대략적인 위치에 액세스 하도록 허용합니다. (Allows an app to access approximate location)

댓글