TextInputLayout 惊现底层bug-on a nul

2019-10-13  本文已影响0人  ifjgm

报错信息提取

Android - Attempt to invoke virtual method 'void android.view.View.getBoundsOnScreen(android.graphics.Rect)' on a null object reference

整体崩溃信息

FATAL EXCEPTION: main 
Process: br.com.fornaro.armariovirtual, PID: 5540
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.getBoundsOnScreen(android.graphics.Rect)' on a null object reference at android.app.assist.AssistStructure$WindowNode.<init>(AssistStructure.java:484)
at android.app.assist.AssistStructure.<init>(AssistStructure.java:1908)
at android.app.ActivityThread.handleRequestAssistContextExtras(ActivityThread.java:3035)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1807)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

解决方案

这是Android framework 的 bug。那么我们直接说解决方案吧

android:importantForAutofill="noExcludeDescendants"

参考链接

可参考stackoverflow 上的解决方案

上一篇 下一篇

猜你喜欢

热点阅读