首页 > 其他 > 详细

解决has leaked ServiceConnection com.baidu.location.c@427b6780

时间:2015-04-21 20:50:48      阅读:506      评论:0      收藏:0      [点我收藏+]

     解决“has leaked ServiceConnection com.baidu.location.c@427b6780 that was originally bound here”的错误,需要修改AndroidManifest.xml文件。

配置Map定位权限和远程链接机制。不然,就会报下面的错误:

has leaked ServiceConnection com.baidu.location.c@427b6780 that was originally bound here
    android.app.ServiceConnectionLeaked: Activity XX.XX.XX.XXXXActivity has leaked ServiceConnection com.baidu.location.c@427b6780 that was originally bound here
            at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)

        方法:

添加定位权限:

    <uses-permission android:name="android.permission.BAIDU_LOCATION_SERVICE" />

        再<application></application>之间添加下面service标签。

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

       配置完成后,启动app。发现运行OK。

解决has leaked ServiceConnection com.baidu.location.c@427b6780

原文:http://blog.csdn.net/john_f_lau/article/details/45174287

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!