该应用已投放市场,有时会报告崩溃。在具有不同Android版本的3个不同设备上,此问题发生了5次。 stacktrace随android版本的不同而有所不同,但大多看起来像这样:
java.lang.IllegalStateException:
at android.widget.TextView.onKeyUp (TextView.java:7465)
at android.view.KeyEvent.dispatch (KeyEvent.java:2750)
at android.view.View.dispatchKeyEvent (View.java:11724)
at android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1845)
at android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1845)
at android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1845)
at android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1845)
at android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1845)
at android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1845)
at android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1845)
at android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1845)
at android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1845)
at android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1845)
at com.android.internal.policy.DecorView.superDispatchKeyEvent (DecorView.java:591)
at com.android.internal.policy.PhoneWindow.superDispatchKeyEvent (PhoneWindow.java:1829)
at android.app.Activity.dispatchKeyEvent (Activity.java:3280)
at android.support.v7.app.AppCompatActivity.dispatchKeyEvent (AppCompatActivity.java:534)
at android.support.v7.view.WindowCallbackWrapper.dispatchKeyEvent (WindowCallbackWrapper.java:58)
at android.support.v7.app.AppCompatDelegateImplBase$AppCompatWindowCallbackBase.dispatchKeyEvent (AppCompatDelegateImplBase.java:316)
at android.support.v7.view.WindowCallbackWrapper.dispatchKeyEvent (WindowCallbackWrapper.java:58)
at com.android.internal.policy.DecorView.dispatchKeyEvent (DecorView.java:401)
at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent (ViewRootImpl.java:4747)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess (ViewRootImpl.java:4619)
at android.view.ViewRootImpl$InputStage.deliver (ViewRootImpl.java:4161)
at android.view.ViewRootImpl$InputStage.onDeliverToNext (ViewRootImpl.java:4214)
at android.view.ViewRootImpl$InputStage.forward (ViewRootImpl.java:4180)
at android.view.ViewRootImpl$AsyncInputStage.forward (ViewRootImpl.java:4307)
at android.view.ViewRootImpl$InputStage.apply (ViewRootImpl.java:4188)
at android.view.ViewRootImpl$AsyncInputStage.apply (ViewRootImpl.java:4364)
at android.view.ViewRootImpl$InputStage.deliver (ViewRootImpl.java:4161)
at android.view.ViewRootImpl$InputStage.onDeliverToNext (ViewRootImpl.java:4214)
at android.view.ViewRootImpl$InputStage.forward (ViewRootImpl.java:4180)
at android.view.ViewRootImpl$InputStage.apply (ViewRootImpl.java:4188)
at android.view.ViewRootImpl$InputStage.deliver (ViewRootImpl.java:4161)
at android.view.ViewRootImpl.deliverInputEvent (ViewRootImpl.java:6682)
at android.view.ViewRootImpl.doProcessInputEvents (ViewRootImpl.java:6656)
at android.view.ViewRootImpl.enqueueInputEvent (ViewRootImpl.java:6617)
at android.view.ViewRootImpl$ViewRootHandler.handleMessage (ViewRootImpl.java:3944)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loop (Looper.java:164)
at android.app.ActivityThread.main (ActivityThread.java:6501)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:807)
我如何了解该问题在哪里进行测试,调试和修复?
答案 0 :(得分:1)
@ i.terrible感谢您的建议。 要了解该问题,我必须检查google提供的崩溃日志和视频(幸运的是,该问题也出现在google的模拟器上,并且它们的日志信息更丰富)。出现此问题的原因在EditText的imeOptions中。我将actionDone放在那里,以避免集中无法聚焦的视图,这已经解决了问题。