在开发的时候突然发现在输入文本框中点击输入法的删除按钮,发现app莫名其妙退出 了。log信息如下:

01-31 16:57:59.524: W/IInputConnectionWrapper(1259): clearMetaKeyStates on inactive InputConnection
01-31 16:57:59.624: W/IInputConnectionWrapper(1259): clearMetaKeyStates on inactive InputConnection
01-31 16:57:59.624: W/IInputConnectionWrapper(1259): beginBatchEdit on inactive InputConnection
01-31 16:57:59.624: W/IInputConnectionWrapper(1259): getTextBeforeCursor on inactive InputConnection
01-31 16:57:59.624: W/IInputConnectionWrapper(1259): endBatchEdit on inactive InputConnection
01-31 16:57:59.624: W/IInputConnectionWrapper(1259): sendKeyEvent on inactive InputConnection
01-31 16:57:59.624: W/IInputConnectionWrapper(1259): sendKeyEvent on inactive InputConnection
01-31 16:57:59.624: W/IInputConnectionWrapper(1259): clearMetaKeyStates on inactive InputConnection
01-31 16:57:59.684: W/IInputConnectionWrapper(1259): showStatusIcon on inactive InputConnection

后来各种查找,发现原来自己在Activity中重写了onKeyDown方法直接退出了Activity。


所以出现了这种Warn的时候请看看自己代码是否重写了onKeyDown或onKeyUp方法,检查下是否有逻辑上的错误。


相关文章:

  • 2022-12-23
  • 2021-12-30
  • 2021-09-17
  • 2022-12-23
  • 2021-04-07
  • 2021-10-05
  • 2022-12-23
  • 2021-09-13
猜你喜欢
  • 2021-05-19
  • 2021-08-28
  • 2022-02-22
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
  • 2022-12-23
相关资源
相似解决方案