2013-04-07 59 views
0

我注意到,在我的应用程序中,当我添加硬件键盘时,应用程序关闭。由于这不会发生在其他应用程序,我假设有一个我不知道的解决方案。下面是来自崩溃的错误日志。任何解决方案的想法?硬件键盘崩溃的应用程序

04-07 02:55:07.885 I/Process (4121): Sending signal. PID: 4121 SIG: 9 
04-07 02:55:07.915 W/InputDispatcher(498): channel '41c28930 com.prapps.inventory/com.prapps.inventory.InventoryActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9 
04-07 02:55:07.915 E/InputDispatcher(498): channel '41c28930 com.prapps.inventory/com.prapps.inventory.InventoryActivity (server)' ~ Channel is unrecoverably broken and will be disposed! 
04-07 02:55:07.925 W/InputDispatcher(498): Attempted to unregister already unregistered input channel '41c28930 com.prapps.inventory/com.prapps.inventory.InventoryActivity (server)' 
04-07 02:55:07.925 I/ActivityManager(498): Process com.prapps.inventory (pid 4121) has died. 
04-07 02:55:07.925 W/ActivityManager(498): Force removing ActivityRecord{416c8930 u0 com.prapps.inventory/.InventoryActivity}: app died, no saved state 
04-07 02:55:07.925 I/WindowState(498): WIN DEATH: Window{41c28930 u0 com.prapps.inventory/com.prapps.inventory.InventoryActivity} 
04-07 02:55:08.015 W/InputMethodManagerService(498): Got RemoteException sending setActive(false) notification to pid 4121 uid 10037 

回答

0

我相信你注销你的键盘的两倍,因此"Attempted to unregister already unregistered input channel"。 为了解决这个问题,我建议你通过你的代码并尝试寻找一个unregister方法的调用并删除它(大概是第二个调用)。

我希望这会有所帮助。

+0

除了上述解决方案之外,我通过向清单中的主要活动添加了 'android:configChanges =“orientation | keyboard”'解决了该问题。 – trvrr 2013-04-07 23:29:07