-1

我正在实现一个小型 android 应用程序,它可以在小分辨率设备和模拟器中正确启动。但我无法在大分辨率(平板电脑)模拟器中启动相同的应用程序。而且我遇到了异常。

06-06 05:30:56.958: W/ActivityManager(295): Unable to start service Intent { act=com.android.email.ACCOUNT_INTENT } U=0: not found
06-06 05:30:56.958: D/ExchangeService(771): !!!  Email application not found; stopping self
06-06 05:30:57.009: W/ActivityManager(295): Unable to start service Intent { act=com.android.email.ACCOUNT_INTENT } U=0: not found
06-06 05:30:57.102: E/ActivityThread(771): Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d1c0b0 that was originally bound here
06-06 05:30:57.102: E/ActivityThread(771): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d1c0b0 that was originally bound here
06-06 05:30:57.102: E/ActivityThread(771):  at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
06-06 05:30:57.102: E/ActivityThread(771):  at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
06-06 05:30:57.102: E/ActivityThread(771):  at android.app.ContextImpl.bindService(ContextImpl.java:1418)
06-06 05:30:57.102: E/ActivityThread(771):  at android.app.ContextImpl.bindService(ContextImpl.java:1407)
06-06 05:30:57.102: E/ActivityThread(771):  at android.content.ContextWrapper.bindService(ContextWrapper.java:473)
06-06 05:30:57.102: E/ActivityThread(771):  at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
06-06 05:30:57.102: E/ActivityThread(771):  at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
06-06 05:30:57.102: E/ActivityThread(771):  at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191)
06-06 05:30:57.102: E/ActivityThread(771):  at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1850)
06-06 05:30:57.102: E/ActivityThread(771):  at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
06-06 05:30:57.102: E/ActivityThread(771):  at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
06-06 05:30:57.102: E/ActivityThread(771):  at android.os.AsyncTask$2.call(AsyncTask.java:287)
06-06 05:30:57.102: E/ActivityThread(771):  at java.util.concurrent.FutureTask.run(FutureTask.java:234)
06-06 05:30:57.102: E/ActivityThread(771):  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
06-06 05:30:57.102: E/ActivityThread(771):  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
06-06 05:30:57.102: E/ActivityThread(771):  at java.lang.Thread.run(Thread.java:856)
06-06 05:30:57.123: E/StrictMode(771): null
06-06 05:30:57.123: E/StrictMode(771): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d1c0b0 that was originally bound here
06-06 05:30:57.123: E/StrictMode(771):  at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
06-06 05:30:57.123: E/StrictMode(771):  at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
06-06 05:30:57.123: E/StrictMode(771):  at android.app.ContextImpl.bindService(ContextImpl.java:1418)
06-06 05:30:57.123: E/StrictMode(771):  at android.app.ContextImpl.bindService(ContextImpl.java:1407)
06-06 05:30:57.123: E/StrictMode(771):  at android.content.ContextWrapper.bindService(ContextWrapper.java:473)
06-06 05:30:57.123: E/StrictMode(771):  at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
06-06 05:30:57.123: E/StrictMode(771):  at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
06-06 05:30:57.123: E/StrictMode(771):  at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191)
06-06 05:30:57.123: E/StrictMode(771):  at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1850)
06-06 05:30:57.123: E/StrictMode(771):  at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
06-06 05:30:57.123: E/StrictMode(771):  at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
06-06 05:30:57.123: E/StrictMode(771):  at android.os.AsyncTask$2.call(AsyncTask.java:287)
06-06 05:30:57.123: E/StrictMode(771):  at java.util.concurrent.FutureTask.run(FutureTask.java:234)
06-06 05:30:57.123: E/StrictMode(771):  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
06-06 05:30:57.123: E/StrictMode(771):  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
06-06 05:30:57.123: E/StrictMode(771):  at java.lang.Thread.run(Thread.java:856)
06-06 05:30:57.168: W/ActivityManager(295): Unbind failed: could not find connection for android.os.BinderProxy@4104c798
06-06 05:30:57.228: E/ActivityThread(771): Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d1c478 that was originally bound here
06-06 05:30:57.228: E/ActivityThread(771): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d1c478 that was originally bound here
06-06 05:30:57.228: E/ActivityThread(771):  at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
06-06 05:30:57.228: E/ActivityThread(771):  at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
06-06 05:30:57.228: E/ActivityThread(771):  at android.app.ContextImpl.bindService(ContextImpl.java:1418)
06-06 05:30:57.228: E/ActivityThread(771):  at android.app.ContextImpl.bindService(ContextImpl.java:1407)
06-06 05:30:57.228: E/ActivityThread(771):  at android.content.ContextWrapper.bindService(ContextWrapper.java:473)
06-06 05:30:57.228: E/ActivityThread(771):  at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
06-06 05:30:57.228: E/ActivityThread(771):  at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
06-06 05:30:57.228: E/ActivityThread(771):  at com.android.emailcommon.service.AccountServiceProxy.getDeviceId(AccountServiceProxy.java:116)
06-06 05:30:57.228: E/ActivityThread(771):  at com.android.exchange.ExchangeService.getDeviceId(ExchangeService.java:1249)
06-06 05:30:57.228: E/ActivityThread(771):  at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1856)
06-06 05:30:57.228: E/ActivityThread(771):  at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
06-06 05:30:57.228: E/ActivityThread(771):  at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
06-06 05:30:57.228: E/ActivityThread(771):  at android.os.AsyncTask$2.call(AsyncTask.java:287)
06-06 05:30:57.228: E/ActivityThread(771):  at java.util.concurrent.FutureTask.run(FutureTask.java:234)
06-06 05:30:57.228: E/ActivityThread(771):  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
06-06 05:30:57.228: E/ActivityThread(771):  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
06-06 05:30:57.228: E/ActivityThread(771):  at java.lang.Thread.run(Thread.java:856)
06-06 05:30:57.308: E/StrictMode(771): null
06-06 05:30:57.308: E/StrictMode(771): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d1c478 that was originally bound here
06-06 05:30:57.308: E/StrictMode(771):  at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969)
06-06 05:30:57.308: E/StrictMode(771):  at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
06-06 05:30:57.308: E/StrictMode(771):  at android.app.ContextImpl.bindService(ContextImpl.java:1418)
06-06 05:30:57.308: E/StrictMode(771):  at android.app.ContextImpl.bindService(ContextImpl.java:1407)
06-06 05:30:57.308: E/StrictMode(771):  at android.content.ContextWrapper.bindService(ContextWrapper.java:473)
06-06 05:30:57.308: E/StrictMode(771):  at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157)
06-06 05:30:57.308: E/StrictMode(771):  at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145)
06-06 05:30:57.308: E/StrictMode(771):  at com.android.emailcommon.service.AccountServiceProxy.getDeviceId(AccountServiceProxy.java:116)
06-06 05:30:57.308: E/StrictMode(771):  at com.android.exchange.ExchangeService.getDeviceId(ExchangeService.java:1249)
06-06 05:30:57.308: E/StrictMode(771):  at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1856)
06-06 05:30:57.308: E/StrictMode(771):  at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551)
06-06 05:30:57.308: E/StrictMode(771):  at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549)
06-06 05:30:57.308: E/StrictMode(771):  at android.os.AsyncTask$2.call(AsyncTask.java:287)
06-06 05:30:57.308: E/StrictMode(771):  at java.util.concurrent.FutureTask.run(FutureTask.java:234)
06-06 05:30:57.308: E/StrictMode(771):  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
06-06 05:30:57.308: E/StrictMode(771):  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
06-06 05:30:57.308: E/StrictMode(771):  at java.lang.Thread.run(Thread.java:856)

请帮我

4

2 回答 2

0

在您的服务停止后,您正在做某事。

添加unbindService(mConnection);你的onStop()方法。代码将开始正常工作。
而且我认为这与屏幕分辨率无关。

于 2013-06-06T06:22:29.420 回答
0

在清单文件的活动中添加以下行:

android:configChanges="screenSize|keyboardHidden|orientation"
于 2013-06-06T06:19:57.747 回答