我有这个例外:
03-29 08:55:10.147 150-162/system_process W/ActivityManager﹕ Scheduling restart of crashed service com.android.inputmethod.latin/.LatinIME in 5000ms
03-29 08:55:10.177 150-164/system_process W/InputMethodManagerService﹕ Session failed to close due to remote exception
android.os.DeadObjectException
at android.os.BinderProxy.transact(Native Method)
at com.android.internal.view.IInputMethodSession$Stub$Proxy.finishSession(IInputMethodSession.java:366)
at com.android.server.InputMethodManagerService.finishSession(InputMethodManagerService.java:1178)
at com.android.server.InputMethodManagerService.clearCurMethodLocked(InputMethodManagerService.java:1190)
at com.android.server.InputMethodManagerService.onServiceDisconnected(InputMethodManagerService.java:1210)
at android.app.LoadedApk$ServiceDispatcher.doDeath(LoadedApk.java:1102)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1116)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at com.android.server.ServerThread.run(SystemServer.java:891)
03-29 08:55:10.187 150-164/system_process W/InputMethodManagerService﹕ Session failed to close due to remote exception
android.os.DeadObjectException
at android.os.BinderProxy.transact(Native Method)
at com.android.internal.view.IInputMethodSession$Stub$Proxy.finishSession(IInputMethodSession.java:366)
at com.android.server.InputMethodManagerService.finishSession(InputMethodManagerService.java:1178)
at com.android.server.InputMethodManagerService.clearCurMethodLocked(InputMethodManagerService.java:1194)
at com.android.server.InputMethodManagerService.onServiceDisconnected(InputMethodManagerService.java:1210)
at android.app.LoadedApk$ServiceDispatcher.doDeath(LoadedApk.java:1102)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1116)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at com.android.server.ServerThread.run(SystemServer.java:891)
但仅适用于Android Emulator(和genymotion)。如何调试和处理此异常?
最佳答案
好的,我找到了解决方案。
当片段显示EditText小部件时,虚拟键盘未显示到某些模拟器中(例如Genymotion),因此当我旋转屏幕时(或通常在重新创建活动时),并导致DeadObject异常。