4)Learning diary for Flutter about problem
发布日期:2021-05-08 17:48:39 浏览次数:18 分类:精选文章

本文共 810 字,大约阅读时间需要 2 分钟。

These days, I  troubled by  the  problem about Flutter Class not found.

Today I seen a example  from flutter sdk.

I found that creating FlutterView didn't use the Flutter Class

So, I tried this  method to create FlutterView Successful

I think the new version of sdk was not have Flutter Class already

protected void onCreate(@Nullable Bundle savedInstanceState) {        super.onCreate(savedInstanceState);        setContentView(R.layout.activity_main);        if (flutterEngine == null) {            flutterEngine = new FlutterEngine(this, null);            flutterEngine.getDartExecutor().executeDartEntrypoint(                    DartExecutor.DartEntrypoint.createDefault()            );        }        FlutterView flutterView=findViewById(R.id.fv);        flutterView.attachToFlutterEngine(flutterEngine);    }

 

上一篇:4)Learning diary for Flutter about android
下一篇:3)Learning diary for flutter about android

发表评论

最新留言

感谢大佬
[***.8.128.20]2025年04月01日 17时23分53秒