Android模拟器垃圾logcat与“服务com.android.exchange.ExchangeService已经泄露了ServiceConnection …这是最初绑定在这里

我正在开发一个非常简单的Android应用程序。 我做了一个闪屏,主菜单和一个单选button和一个button(播放声音取决于一个单选button检查)的页面。 应用程序工作正常(不会崩溃),但我得到所有这些错误logcat(我运行应用程序与模拟器)。 那可能是什么? 我怎么解决它? 我应该担心吗? 当有人问我时,我会另外发布代码,因为我不知道问题出在哪里,我不想将所有.java和xml文件无故发送到垃圾邮件。

logcat中的错误:

12-07 14:24:28.301: E/ActivityThread(587): Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d0c8d8 that was originally bound here 12-07 14:24:28.301: E/ActivityThread(587): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d0c8d8 that was originally bound here 12-07 14:24:28.301: E/ActivityThread(587): at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969) 12-07 14:24:28.301: E/ActivityThread(587): at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863) 12-07 14:24:28.301: E/ActivityThread(587): at android.app.ContextImpl.bindService(ContextImpl.java:1418) 12-07 14:24:28.301: E/ActivityThread(587): at android.app.ContextImpl.bindService(ContextImpl.java:1407) 12-07 14:24:28.301: E/ActivityThread(587): at android.content.ContextWrapper.bindService(ContextWrapper.java:473) 12-07 14:24:28.301: E/ActivityThread(587): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157) 12-07 14:24:28.301: E/ActivityThread(587): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145) 12-07 14:24:28.301: E/ActivityThread(587): at com.android.emailcommon.service.AccountServiceProxy.getDeviceId(AccountServiceProxy.java:116) 12-07 14:24:28.301: E/ActivityThread(587): at com.android.exchange.ExchangeService.getDeviceId(ExchangeService.java:1249) 12-07 14:24:28.301: E/ActivityThread(587): at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1856) 12-07 14:24:28.301: E/ActivityThread(587): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551) 12-07 14:24:28.301: E/ActivityThread(587): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549) 12-07 14:24:28.301: E/ActivityThread(587): at android.os.AsyncTask$2.call(AsyncTask.java:287) 12-07 14:24:28.301: E/ActivityThread(587): at java.util.concurrent.FutureTask.run(FutureTask.java:234) 12-07 14:24:28.301: E/ActivityThread(587): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) 12-07 14:24:28.301: E/ActivityThread(587): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) 12-07 14:24:28.301: E/ActivityThread(587): at java.lang.Thread.run(Thread.java:856) 12-07 14:24:28.312: E/StrictMode(587): null 12-07 14:24:28.312: E/StrictMode(587): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d0c8d8 that was originally bound here 12-07 14:24:28.312: E/StrictMode(587): at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969) 12-07 14:24:28.312: E/StrictMode(587): at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863) 12-07 14:24:28.312: E/StrictMode(587): at android.app.ContextImpl.bindService(ContextImpl.java:1418) 12-07 14:24:28.312: E/StrictMode(587): at android.app.ContextImpl.bindService(ContextImpl.java:1407) 12-07 14:24:28.312: E/StrictMode(587): at android.content.ContextWrapper.bindService(ContextWrapper.java:473) 12-07 14:24:28.312: E/StrictMode(587): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157) 12-07 14:24:28.312: E/StrictMode(587): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145) 12-07 14:24:28.312: E/StrictMode(587): at com.android.emailcommon.service.AccountServiceProxy.getDeviceId(AccountServiceProxy.java:116) 12-07 14:24:28.312: E/StrictMode(587): at com.android.exchange.ExchangeService.getDeviceId(ExchangeService.java:1249) 12-07 14:24:28.312: E/StrictMode(587): at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1856) 12-07 14:24:28.312: E/StrictMode(587): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551) 12-07 14:24:28.312: E/StrictMode(587): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549) 12-07 14:24:28.312: E/StrictMode(587): at android.os.AsyncTask$2.call(AsyncTask.java:287) 12-07 14:24:28.312: E/StrictMode(587): at java.util.concurrent.FutureTask.run(FutureTask.java:234) 12-07 14:24:28.312: E/StrictMode(587): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) 12-07 14:24:28.312: E/StrictMode(587): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) 12-07 14:24:28.312: E/StrictMode(587): at java.lang.Thread.run(Thread.java:856) 12-07 14:24:28.312: W/ActivityManager(273): Unbind failed: could not find connection for android.os.BinderProxy@40f409d8 12-07 14:24:28.322: E/ActivityThread(587): Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d5ed58 that was originally bound here 12-07 14:24:28.322: E/ActivityThread(587): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d5ed58 that was originally bound here 12-07 14:24:28.322: E/ActivityThread(587): at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969) 12-07 14:24:28.322: E/ActivityThread(587): at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863) 12-07 14:24:28.322: E/ActivityThread(587): at android.app.ContextImpl.bindService(ContextImpl.java:1418) 12-07 14:24:28.322: E/ActivityThread(587): at android.app.ContextImpl.bindService(ContextImpl.java:1407) 12-07 14:24:28.322: E/ActivityThread(587): at android.content.ContextWrapper.bindService(ContextWrapper.java:473) 12-07 14:24:28.322: E/ActivityThread(587): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157) 12-07 14:24:28.322: E/ActivityThread(587): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145) 12-07 14:24:28.322: E/ActivityThread(587): at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191) 12-07 14:24:28.322: E/ActivityThread(587): at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1850) 12-07 14:24:28.322: E/ActivityThread(587): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551) 12-07 14:24:28.322: E/ActivityThread(587): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549) 12-07 14:24:28.322: E/ActivityThread(587): at android.os.AsyncTask$2.call(AsyncTask.java:287) 12-07 14:24:28.322: E/ActivityThread(587): at java.util.concurrent.FutureTask.run(FutureTask.java:234) 12-07 14:24:28.322: E/ActivityThread(587): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) 12-07 14:24:28.322: E/ActivityThread(587): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) 12-07 14:24:28.322: E/ActivityThread(587): at java.lang.Thread.run(Thread.java:856) 12-07 14:24:28.341: E/StrictMode(587): null 12-07 14:24:28.341: E/StrictMode(587): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d5ed58 that was originally bound here 12-07 14:24:28.341: E/StrictMode(587): at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969) 12-07 14:24:28.341: E/StrictMode(587): at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863) 12-07 14:24:28.341: E/StrictMode(587): at android.app.ContextImpl.bindService(ContextImpl.java:1418) 12-07 14:24:28.341: E/StrictMode(587): at android.app.ContextImpl.bindService(ContextImpl.java:1407) 12-07 14:24:28.341: E/StrictMode(587): at android.content.ContextWrapper.bindService(ContextWrapper.java:473) 12-07 14:24:28.341: E/StrictMode(587): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157) 12-07 14:24:28.341: E/StrictMode(587): at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145) 12-07 14:24:28.341: E/StrictMode(587): at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191) 12-07 14:24:28.341: E/StrictMode(587): at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1850) 12-07 14:24:28.341: E/StrictMode(587): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551) 12-07 14:24:28.341: E/StrictMode(587): at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549) 12-07 14:24:28.341: E/StrictMode(587): at android.os.AsyncTask$2.call(AsyncTask.java:287) 12-07 14:24:28.341: E/StrictMode(587): at java.util.concurrent.FutureTask.run(FutureTask.java:234) 12-07 14:24:28.341: E/StrictMode(587): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) 12-07 14:24:28.341: E/StrictMode(587): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) 12-07 14:24:28.341: E/StrictMode(587): at java.lang.Thread.run(Thread.java:856) 

更简单的解决方法是在“设置:应用程序:全部”下的模拟设备中禁用“Exchange服务”

(您可能需要轻扫才能看到“全部”选项卡)

我没有任何帮助,直到我删除了当前的仿真器设备。 之后,我build立了一个全新的虚拟设备。 我的新仿真器设备没有所有这些错误。 这解决了我的问题。

在我的情况下,什么工作是closures防火墙(我使用最新的Android SDK 4.2,Windows 8的机器)。

在search这个错误的60分钟后,我发现我刚刚有一个infiniteloop,导致此交换服务垃圾邮件,直到应用程序closures。 只要把这个留在这里,以防其他人反感

这可能是仿真器中误导性的错误信息。

我很迷惑,直到我连接了一个实际的设备,它在同一个点坠毁,而是抱怨缺less使用权限。 添加使用权限解决了这个问题。

这不会成为所有用户的问题的根源,但也可能是一些用户的问题。