-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.NullPointerException: Attempt to invoke virtual method 'void io.flutter.plugin.editing.TextInputPlugin.onProvideAutofillVirtualStructure(android.view.ViewStructure, int)' on a null object reference #2062
Comments
FlutterView 方法: 对该方法增加try-catch,可以加,但是比较困难,有没有其他方法处理该问题。 |
public boolean attachToEngineAutomatically() { |
仅仅修改这个,会出现view 重复加载的崩溃:
|
我也遇到了同样的问题, 请问解决了吗? |
这个问题原因是因为把有 这个说到底是Flutter SDK中的问题,最好还是去Flutter SDK那提个issue。然后这个不是很好修改来兼容,建议业务上不要直接将不显示的 |
已经解决了。把它的其中一条提交,还原了。 Activity 和 Fragment 的绑定,一开始没初始化,把它改成绑定去。 flutter_boost的提交记录:
|
我去提过了,但是他们要求先搞个不包含flutter_boost 的例子,太麻烦了,而且,他们自己的例子,没有问题,你去提,也没啥用。 |
这个应该是你没讲清楚是在混合开发场景下的情况 flutter/flutter#149792 。之前3.19.x在Flutter Boost上出现兼容问题,0xZone也是提给Flutter issue然后解决的。 |
哦哦,那应该是了吧。不过我的帖子,他们今天关掉了。也不想去问了。 |
您好, 是将FlutterBoostActivity和FlutterBoostFragment这俩类中的attachToEngineAutomatically返回值都改为true吗? 我看上面您将这个返回值修改后出现了view重复加载的异常. |
我贴了修改的提交记录。 也就是我贴的 flutter boost 的提交记录,还原一下。 |
好的, 谢谢 |
请描述遇到的问题,以及您所期望的正确的结果
1、update flutter version from 3.3.9 to 3.16.9
2、Open the phone settings and turn on the application password book function
3、create a viewpage fragment, one is native fragment and has edit, other is flutter fragment and init
then,
When you click on the edit box of the native fragment, it will inevitably collapse and appear.
crash log:
java.lang.NullPointerException: Attempt to invoke virtual method 'void io.flutter.plugin.editing.TextInputPlugin.onProvideAutofillVirtualStructure(android.view.ViewStructure, int)' on a null object reference
at io.flutter.embedding.android.FlutterView.onProvideAutofillVirtualStructure(FlutterView.java:1525)
at android.view.View.dispatchProvideStructure(View.java:10364)
at android.view.View.dispatchProvideAutofillStructure(View.java:10356)
at android.view.ViewGroup.dispatchProvideAutofillStructure(ViewGroup.java:3708)
at android.view.ViewGroup.dispatchProvideAutofillStructure(ViewGroup.java:3728)
at android.view.ViewGroup.dispatchProvideAutofillStructure(ViewGroup.java:3728)
at android.app.assist.AssistStructure$WindowNode.(AssistStructure.java:527)
at android.app.assist.AssistStructure.(AssistStructure.java:2345)
at android.app.ActivityThread.handleRequestAssistContextExtras(ActivityThread.java:4101)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2427)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:240)
at android.os.Looper.loop(Looper.java:351)
at android.app.ActivityThread.main(ActivityThread.java:8423)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)
请说明如何操作会遇到上述问题
一定要开启密码本:
最好是pad或者折叠屏手机:
在下面填入关键复现代码
demo:
mtp_test_demo.zip
复现的平台
Both
Flutter SDK版本
3.16.9
FlutterBoost版本
5.0.1
是否延迟初始化FlutterBoost
No
解决方案
The text was updated successfully, but these errors were encountered: