45

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 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)
Flow
  • 23,572
  • 15
  • 99
  • 156
user1880779
  • 2,038
  • 8
  • 30
  • 40
  • I can't see anything in this log related to your app. These errors seem to be related to ExchangeService in android itself. – Aleks G Dec 07 '12 at 14:40
  • @AleksG Yes, that's what I thought, but still - should I close my eyes on this? I don't think getting so much errors is considered - normal. – user1880779 Dec 07 '12 at 15:47
  • No, it's not normal, but I don't think they have anything to do with your app, so it's probably ok to ignore them. To be sure though, try testing your app on an actual handset and see what happens. – Aleks G Dec 07 '12 at 15:51
  • @AleksG OK, thanks. If anyone else has some idea or a solution, please help. – user1880779 Dec 07 '12 at 16:00
  • You should mark @Nuthatch as correct – Chad Bingham Jul 28 '13 at 16:13

5 Answers5

131

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)

Nuthatch
  • 3,597
  • 4
  • 24
  • 17
  • 5
    This should be selected as the right answer. I had this issue and creating another emulator just for this is not a good solution. – achie Feb 06 '13 at 19:20
  • In the Emulator I see: Settings -> Apps but not ALL - can u explain more detailed? – Thorsten Niehues Feb 20 '13 at 13:30
  • 3
    @ThorstenNiehues : when I go to Settings -> Apps, there are 3 tabs : Downloaded, Running and All. That process was in the All tab. – SolarBear Feb 27 '13 at 15:37
  • 1
    This works! It definitively should be a marked as right answer! – RKI Mar 14 '13 at 18:10
  • This one worked for me. I don't use Exchange and the emulator was throwing exceptions with it, so disabling Exchange was the answer for me. – Jim Mar 23 '13 at 17:24
  • 6
    I hate to admit this but I was looking in the IDE for this setting. I would point out for others as slow as me. That this is on the actual emulator. :) – vikingben Aug 02 '13 at 20:10
  • 1
    @vikingben oh, good point. I've updated my answer to make this more clear. Thanks! – Nuthatch Aug 03 '13 at 00:46
  • Can't use this on real devices: my Galaxy S5 will not let me disable 'Exchange Services.' I can only Force-Stop. – Bram Sep 13 '15 at 21:11
  • Absolutely, you can't use answer on real devices! The question here is about the Android *emulator*. Real devices log tons of garbage. I'm afraid you'll have to explicitly filter device logs for your messages. That's a different question. – Nuthatch Sep 14 '15 at 13:12
6

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.

user1880779
  • 2,038
  • 8
  • 30
  • 40
1

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

Chayemor
  • 3,577
  • 4
  • 31
  • 54
1

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

ngrashia
  • 9,869
  • 5
  • 43
  • 58
schippi
  • 1,034
  • 5
  • 15
0

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.

Avram Score
  • 3,927
  • 2
  • 17
  • 12