在使用百度地图的SDK时,出现.LocationDemo has leaked ServiceConnection 异常并且无法定位的时候

天蓝Sea

关注

阅读 96

2022-11-24


Activity com.example.diarysytsem.LocationDemo has leaked ServiceConnection com.baidu.location.c@4247e170 that was originally bound here

这个是因为在配置文件中没有加入服务的原因,解决方法就是为这个application注册服务

<service
android:name="com.baidu.location.f"
android:enabled="true"
android:process=":remote" >
</service>



精彩评论(0)

0 0 举报