2013-08-19 66 views
0

我做了一個在我的設備上正常工作的android應用程序,但是當我在仿真器上運行它時,應用程序崩潰。Android應用程序不能在模擬器中工作

我logcat的是:

08-19 07:09:46.497: ERROR/ActivityThread(768): Service com.android.exchange.ExchangeService has leaked ServiceConnection [email protected]f4668 that was originally bound here 
     android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection [email protected]f4668 that was originally bound here 
     at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969) 
     at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863) 
     at android.app.ContextImpl.bindService(ContextImpl.java:1418) 
     at android.app.ContextImpl.bindService(ContextImpl.java:1407) 
     at android.content.ContextWrapper.bindService(ContextWrapper.java:473) 
     at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157) 
     at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145) 
     at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191) 
     at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1850) 
     at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551) 
     at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549) 
     at android.os.AsyncTask$2.call(AsyncTask.java:287) 
     at java.util.concurrent.FutureTask.run(FutureTask.java:234) 
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) 
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) 
     at java.lang.Thread.run(Thread.java:856) 
08-19 07:09:46.497: ERROR/StrictMode(768): null 
     android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection [email protected]f4668 that was originally bound here 
     at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:969) 
     at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863) 
     at android.app.ContextImpl.bindService(ContextImpl.java:1418) 
     at android.app.ContextImpl.bindService(ContextImpl.java:1407) 
     at android.content.ContextWrapper.bindService(ContextWrapper.java:473) 
     at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:157) 
     at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:145) 
     at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:191) 
     at com.android.exchange.ExchangeService$7.run(ExchangeService.java:1850) 
     at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:551) 
     at com.android.emailcommon.utility.Utility$2.doInBackground(Utility.java:549) 
     at android.os.AsyncTask$2.call(AsyncTask.java:287) 
     at java.util.concurrent.FutureTask.run(FutureTask.java:234) 
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) 
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) 
     at java.lang.Thread.run(Thread.java:856) 

我也做出新的AVD,然後運行該應用程序,但我得到了同樣的錯誤。

+0

你可以給出給你這個錯誤的活動的代碼。是在清單文件中添加的活動? – HpTerm

+0

是,該活動添加到清單文件中 –

回答

2
Try Creating New AVD 
    OR 
    I had the same issue, and solved it by removing the "use host GPU" option 
    OR 
    Disable "Exchange Services" in the emulated device under Settings ->Apps -> All 
相關問題