Android模拟器无法安装任何apk文件并显示android.app.ServiceConnectionLeaked

时间:2013-03-25 13:48:47

标签: android android-emulator android-service connection-leaks

我在 eclipse ADT 中使用 Android API 4.2(17)在模拟器中运行任何Android应用程序时出现以下错误。早期我的应用程序运行良好,但是重新启动我的机器后,这个问题就开始了。

[2013-03-25 18:25:42 - MyHapiSample] Failed to install MyHapiSample.apk on device 'emulator-5554!
[2013-03-25 18:25:42 - MyHapiSample] (null)
[2013-03-25 18:25:53 - MyHapiSample] Launch canceled!

logcat显示以下错误

 03-25 11:42:39.838: E/ActivityThread(632): Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d293d8 that was originally bound here
 03-25 11:42:39.838: E/ActivityThread(632): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d293d8 that was originally bound here
 03-25 11:42:39.838: E/ActivityThread(632):     at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
 03-25 11:42:39.838: E/ActivityThread(632):     at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
 03-25 11:42:39.838: E/ActivityThread(632):     at android.app.ContextImpl.bindService(ContextImpl.java:1418)
 03-25 11:42:39.838: E/ActivityThread(632):     at android.app.ContextImpl.bindService(ContextImpl.java:1407)
 03-25 11:42:39.838: E/ActivityThread(632):     at android.content.ContextWrapper.bindService(ContextWrapper.java:473)
 03-25 11:42:39.838: E/ActivityThread(632):     at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
 03-25 11:42:39.838: E/ActivityThread(632):     at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
 03-25 11:42:39.838: E/ActivityThread(632):     at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191)
 03-25 11:42:39.838: E/ActivityThread(632):     at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1850)
 03-25 11:42:39.838: E/ActivityThread(632):     at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
 03-25 11:42:39.838: E/ActivityThread(632):     at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
 03-25 11:42:39.838: E/ActivityThread(632):     at android.os.AsyncTask$2.call(AsyncTask.java:287)
 03-25 11:42:39.838: E/ActivityThread(632):     at java.util.concurrent.FutureTask.run(FutureTask.java:234)
 03-25 11:42:39.838: E/ActivityThread(632):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
 03-25 11:42:39.838: E/ActivityThread(632):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
 03-25 11:42:39.838: E/ActivityThread(632):     at java.lang.Thread.run(Thread.java:856)
 03-25 11:42:39.856: E/StrictMode(632): null
 03-25 11:42:39.856: E/StrictMode(632): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d293d8 that was originally bound here
 03-25 11:42:39.856: E/StrictMode(632):     at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
 03-25 11:42:39.856: E/StrictMode(632):     at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
 03-25 11:42:39.856: E/StrictMode(632):     at android.app.ContextImpl.bindService(ContextImpl.java:1418)
 03-25 11:42:39.856: E/StrictMode(632):     at android.app.ContextImpl.bindService(ContextImpl.java:1407)
 03-25 11:42:39.856: E/StrictMode(632):     at android.content.ContextWrapper.bindService(ContextWrapper.java:473)
 03-25 11:42:39.856: E/StrictMode(632):     at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
 03-25 11:42:39.856: E/StrictMode(632):     at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
 03-25 11:42:39.856: E/StrictMode(632):     at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191)
 03-25 11:42:39.856: E/StrictMode(632):     at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1850)
 03-25 11:42:39.856: E/StrictMode(632):     at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
 03-25 11:42:39.856: E/StrictMode(632):     at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
 03-25 11:42:39.856: E/StrictMode(632):     at android.os.AsyncTask$2.call(AsyncTask.java:287)
 03-25 11:42:39.856: E/StrictMode(632):     at java.util.concurrent.FutureTask.run(FutureTask.java:234)
 03-25 11:42:39.856: E/StrictMode(632):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
 03-25 11:42:39.856: E/StrictMode(632):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
 03-25 11:42:39.856: E/StrictMode(632):     at java.lang.Thread.run(Thread.java:856)
 03-25 11:42:39.875: W/ActivityManager(287): Unbind failed: could not find connection for android.os.BinderProxy@40e7cc50
 03-25 11:42:39.885: D/dalvikvm(632): GC_CONCURRENT freed 484K, 20% free 2472K/3084K, paused 74ms+7ms, total 175ms
 03-25 11:43:00.025: W/Trace(287): Unexpected value from nativeGetEnabledTags: 0
 03-25 11:43:00.025: W/Trace(287): Unexpected value from nativeGetEnabledTags: 0
 03-25 11:43:00.038: W/Trace(287): Unexpected value from nativeGetEnabledTags: 0
 03-25 11:43:00.044: W/Trace(556): Unexpected value from nativeGetEnabledTags: 0
 03-25 11:43:00.065: W/Trace(287): Unexpected value from nativeGetEnabledTags: 0
 03-25 11:43:00.099: W/Trace(816): Unexpected value from nativeGetEnabledTags: 0
 03-25 11:43:00.124: W/Trace(816): Unexpected value from nativeGetEnabledTags: 0
 03-25 11:43:00.138: W/Trace(556): Unexpected value from nativeGetEnabledTags: 0
 03-25 11:43:00.138: W/Trace(556): Unexpected value from nativeGetEnabledTags: 0
 03-25 11:43:00.138: W/Trace(556): Unexpected value from nativeGetEnabledTags: 0
 03-25 11:43:00.146: W/Trace(816): Unexpected value from nativeGetEnabledTags: 0
 03-25 11:43:00.146: W/Trace(816): Unexpected value from nativeGetEnabledTags: 0
 03-25 11:43:00.164: W/Trace(816): Unexpected value from nativeGetEnabledTags: 0
 03-25 11:43:00.174: W/Trace(816): Unexpected value from nativeGetEnabledTags: 0
 03-25 11:43:00.174: W/Trace(816): Unexpected value from nativeGetEnabledTags: 0
 03-25 11:43:00.174: W/Trace(816): Unexpected value from nativeGetEnabledTags: 0
 03-25 11:43:00.204: W/Trace(816): Unexpected value from nativeGetEnabledTags: 0
 03-25 11:43:00.204: W/Trace(816): Unexpected value from nativeGetEnabledTags: 0
 03-25 11:43:00.225: W/Trace(816): Unexpected value from nativeGetEnabledTags: 0
 03-25 11:43:00.283: W/Trace(816): Unexpected value from nativeGetEnabledTags: 0
 03-25 11:43:00.285: W/Trace(816): Unexpected value from nativeGetEnabledTags: 0
 03-25 11:43:00.285: W/Trace(816): Unexpected value from nativeGetEnabledTags: 0
 03-25 11:43:00.344: W/Trace(816): Unexpected value from nativeGetEnabledTags: 0
 03-25 11:43:00.374: W/Trace(816): Unexpected value from nativeGetEnabledTags: 0
 03-25 11:43:00.374: W/Trace(816): Unexpected value from nativeGetEnabledTags: 0
 03-25 11:43:00.374: W/Trace(816): Unexpected value from nativeGetEnabledTags: 0
 : E/(): Device disconnected

Android的某些设置是否已更改,是否必须重新安装eclipse?

我无能为力android.app.ServiceConnectionLeaked是什么意思,或者是什么导致了这个错误并拼命寻求帮助。

1 个答案:

答案 0 :(得分:0)

我可以按照谢尔盖·本纳建议的链接建议修复错误。我遇到了模拟器和第三方jar文件的一些问题。当我重新创建设备模拟器时,我可以修复错误,我的应用程序运行正常