码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2015-04-21 20:53:42      阅读:1239      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!