0

尝试在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 的含义或导致此错误的原因并拼命寻求帮助。

4

1 回答 1

0

我可以按照 Sergey Benner 建议的链接中的建议修复错误。我在模拟器和第三方 jar 文件方面遇到了一些问题。当我重新创建设备模拟器时,我可以修复错误并且我的应用程序运行正常。

于 2013-03-29T06:00:34.180 回答