Comments (12)
FlutterView 方法:
public void onProvideAutofillVirtualStructure(@nonnull ViewStructure structure, int flags) {
super.onProvideAutofillVirtualStructure(structure, flags);
this.textInputPlugin.onProvideAutofillVirtualStructure(structure, flags);
}
对该方法增加try-catch,可以加,但是比较困难,有没有其他方法处理该问题。
from flutter_boost.
public boolean attachToEngineAutomatically() {
return true;
}
已处理,这个阻碍了创建。导致密码本的问题处理,这个建议你们看看怎么优化一下。
from flutter_boost.
仅仅修改这个,会出现view 重复加载的崩溃:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.teamtalk.im/com.kdweibo.android.flutter.activity.FlutterWebActivity}: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3872)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4014)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:111)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2470)
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)
Caused by: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
at android.view.ViewGroup.addViewInner(ViewGroup.java:5342)
at android.view.ViewGroup.addView(ViewGroup.java:5163)
at android.view.ViewGroup.addView(ViewGroup.java:5103)
at android.view.ViewGroup.addView(ViewGroup.java:5075)
at io.flutter.plugin.platform.PlatformViewsController.F(SourceFile:7)
at com.kdweibo.android.flutter.platform.FlutterBoostPlatformViewsController.F(SourceFile:1)
at io.flutter.embedding.android.FlutterView.n(SourceFile:45)
at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.r(SourceFile:15)
at io.flutter.embedding.android.FlutterActivity.c(SourceFile:3)
at io.flutter.embedding.android.FlutterActivity.onCreate(SourceFile:8)
at com.idlefish.flutterboost.containers.FlutterBoostActivity.onCreate(SourceFile:7)
at com.kdweibo.android.flutter.FlutterBoostFixedActivity.onCreate(SourceFile:1)
at com.kdweibo.android.flutter.activity.FlutterWebActivity.onCreate(SourceFile:1)
at android.app.Activity.performCreate(Activity.java:8422)
at android.app.Activity.performCreate(Activity.java:8395)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1403)
from flutter_boost.
我也遇到了同样的问题, 请问解决了吗?
from flutter_boost.
这个问题原因是因为把有FlutterView
的Fragment绑定到了界面上,但不去显示Fragment
,导致FlutterView不会绑定Engine,然后在Native的EditText上弹出自动填充弹框,这个时候这个弹窗会从根view开始进行dispatch,所以FlutterView也会收到,触发onProvideAutofillVirtualStructure
,导致NPE。
这个说到底是Flutter SDK中的问题,最好还是去Flutter SDK那提个issue。然后这个不是很好修改来兼容,建议业务上不要直接将不显示的FlutterFragment
绑定到界面上,等需要显示的时候,再添加到界面上,以此规避掉这个问题。
from flutter_boost.
我也遇到了同样的问题, 请问解决了吗?
已经解决了。把它的其中一条提交,还原了。
Activity 和 Fragment 的绑定,一开始没初始化,把它改成绑定去。
flutter_boost的提交记录:
f4fcafb
Avoid unnecessary attach/detach operations of the engine. Rulong Chen(陈汝龙) 2023/12/26, 14:54
我把这个提交都还原了。
@Override
public boolean attachToEngineAutomatically() {
return true;
}
from flutter_boost.
我去提过了,但是他们要求先搞个不包含flutter_boost 的例子,太麻烦了,而且,他们自己的例子,没有问题,你去提,也没啥用。
from flutter_boost.
这个应该是你没讲清楚是在混合开发场景下的情况 flutter/flutter#149792 。之前3.19.x在Flutter Boost上出现兼容问题,0xZone也是提给Flutter issue然后解决的。
from flutter_boost.
哦哦,那应该是了吧。不过我的帖子,他们今天关掉了。也不想去问了。
我弄个帖子,demo都提供了,崩溃点,修改意见都给了,还要要求最简单demo,感觉有点过分。就只能先这样了。
from flutter_boost.
Related Issues (20)
- [Bug]: 连续 push 多个页面后返回,栈底页面会 rebuild,页面上的 Image 组件会闪烁一下重新加载图片,体验非常差。 HOT 15
- 鸿蒙版请适配ohos插件结构修改 HOT 1
- [Bug]: Android FlutterBoostFragment无法触发onActivityForResult HOT 2
- The application must have a host view since the keyboard client must be part of the responder chain to function. The host view controller is (null) HOT 1
- [ohos] FlutterBoostUtils的问题 HOT 1
- 关于鸿蒙flutter_boost 的问题 HOT 3
- [Bug]: 项目集成了flutter_boost 使用share_plus,将文件分享到钉钉后Flutter页面出现卡死的现象
- [ohos] pushReplacement有问题 HOT 1
- 【ohos】flutter_boost.har HOT 2
- 将flutter_boost实现为联邦插件(Federated plugin) HOT 1
- [Bug]: iOS原生页面,如何嵌套Flutter页面
- [Bug]: iOS的原生页面,嵌入了一块Flutter的页面,怎么去释放这个页面 HOT 1
- [Bug]: BottomNavigationBar 进入二级页面,二级页面无法显示BottomNavigationBar HOT 2
- 【ohos】example项目启动的时候白屏没有内容 HOT 1
- [Bug]: Flutter Layout Insepctor 无效,请问有什么可以尝试的解决方案 HOT 1
- [Bug]: Flutter版本3.19.6是否可以兼容OHOS HOT 2
- [其他] 各位大佬能否把antd-mobile用flutter实现一把 HOT 3
- [Bug]: Execution failed for task ':flutter_boost:generateDebugRFile'. This project uses AndroidX dependencies HOT 5
- OHOS 中 FlutterBoostDelegate 为啥不增加pop 呢 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_boost.