需要在module.json5文件中配置ohos.permission.LOCATION,ohos.permission.APPROXIMATELY\_LOCATION权限。{ "name": "ohos.permission.LOCATION", "reason": "$string:reason", "usedScene": { "abilities": [ "FormAbility" ] , "when": "inuse" } } , { "name": "ohos.permission.APPROXIMATELY_LOCATION", "reason": "$string:reason", "usedScene": { "abilities": [ "FormAbility" ] , "when": "inuse" } }
需要在module.json5文件中配置ohos.permission.LOCATION,ohos.permission.APPROXIMATELY\_LOCATION权限。