I am working on a very simple application in Android. I made a splash screen, main menu and a page with radio buttons and a button (which plays a sound depending on a radiobutton checked). The application works fine (doesn't crash) but I'm getting all these errors all the time in logcat (I run application with emulator). What could that be? How could I fix it? Should I be worried? I will post codes additionally when someone asks because I don't know where could the problem be and I don't want to post all .java and xml files to spam without a reason.

Errors in logcat :

    12-07 14:24:28.301: E/ActivityThread(587): Service com.android.exchange.ExchangeService has leaked ServiceConnection [email protected]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 [email protected]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 [email protected]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 [email protected]40f409d8
12-07 14:24:28.322: E/ActivityThread(587): Service com.android.exchange.ExchangeService has leaked ServiceConnection [email protected]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 [email protected]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 [email protected]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)

Solution 1

A simpler fix is to disable "Exchange Services" in the emulated device under Settings : Apps : All

(you may need to swipe over to see the "All" tab)

Solution 2

Nothing helped me until I deleted this current emulator device. After that I have set up a completely new virtual device. My new emulator device doesn't have all these errors. This fixed my problem.

Solution 3

In my case what worked was turning off the Firewall (I use Windows 8 machine with the latest SDK for Android, 4.2).

Solution 4

After 60minutes of searching around this error I spotted that I just had an infiniteloop which caused this exchange service spam until app-shutdown. just leaving this here in case anyone else overthinks it

Solution 5

This can be a misleading error message in the emulator.

I was mystified, until I hooked up an actual device, which crashed at the same point, but instead complaining about a missing use-permission. Adding the use-permission fixed the issue.

This isn't going to be source of the problem for all users, but it might be for some.