有没有办法跟踪此异常:焦点搜索返回了无法聚焦的视图 [英] Is there a way to track this exception: focus search returned a view that wasn't able to take focus
本文介绍了有没有办法跟踪此异常:焦点搜索返回了无法聚焦的视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我通过以下堆栈获得了Crashlytics的一些崩溃日志:
I get some crash logs with Crashlytics with the following stack:
Fatal Exception: java.lang.IllegalStateException: focus search returned a view that wasn't able to take focus!
at android.widget.TextView.onKeyUp(TextView.java:6413)
at android.view.KeyEvent.dispatch(KeyEvent.java:2712)
at android.view.View.dispatchKeyEvent(View.java:9960)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1630)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1630)
at android.widget.ScrollView.dispatchKeyEvent(ScrollView.java:387)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1630)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1630)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1630)
at com.android.internal.policy.DecorView.superDispatchKeyEvent(DecorView.java:406)
at com.android.internal.policy.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1798)
at android.app.Activity.dispatchKeyEvent(Activity.java:3024)
at com.android.internal.policy.DecorView.dispatchKeyEvent(DecorView.java:320)
at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:4331)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4302)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3853)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3906)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3872)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3999)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3880)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4056)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3853)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3906)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3872)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3880)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3853)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6247)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6221)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6182)
at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3651)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6121)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
The closest answer I could find is here: Fatal crash: Focus search returned a view that wasn't able to take focus
但是我的问题是,如何跟踪此崩溃的原因? 很难指出这一点,因为崩溃日志对崩溃实际发生的确切来源还没有足够的解释
But my question is, how can I track the source for this crash? It is hard to indicate it since the crash log isn't explanatory enough about the exact source where the crash actually
推荐答案
我也使用以下方法解决此问题:
I also solve this problem using this:
editText.setImeOptions(EditorInfo.IME_ACTION_DONE);
只需将其设置为我的editText de ImeOptions.我希望这个对你有用.
just setting to my editText de ImeOptions. I hope it works for you.
这篇关于有没有办法跟踪此异常:焦点搜索返回了无法聚焦的视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文