Flutter使用HERE-SDK时HerePositioningClient初始化失败如何解决?
Flutter接入HERE-SDK出现HerePositioningClient初始化失败的解决说明
故障现象
在Flutter项目中接入HERE-SDK进行开发时,出现HerePositioningClient初始化失败问题,对应报错信息如下:
onInitializationFailed. API token that failed: com.here.services.location.LocationServices$1@2bdef2b
同时ActivityThread抛出IntentReceiver泄漏异常:
E/ActivityThread(12002): Service com.here.services.internal.LocationService has leaked IntentReceiver com.here.odnp.util.AlarmTimer$Scheduler@163882d that was originally registered here. Are you missing a call to unregisterReceiver()? E/ActivityThread(12002): android.app.IntentReceiverLeaked: Service com.here.services.internal.LocationService has leaked IntentReceiver com.here.odnp.util.AlarmTimer$Scheduler@163882d that was originally registered here. Are you missing a call to unregisterReceiver()?
解决方法
仅添加位置权限和Activity相关权限无法解决该问题,需要完整配置官方示例文件要求的所有权限即可修复上述故障。
内容的提问来源于stack exchange,提问作者Prayush
相关产品推荐
相关产品推荐

