-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Flutter工程加入到已有的Native APP,该如何集成? #9
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
Comments
@ruanchaohouzi 要在你的flutter module里的接入flutter_boost, 里边找yaml进行配置 |
@moonljt521 对呀,flutter module里的已经接入了flutter_boost,我问的是Native APP工程该怎么集成?也就是是Native的Application已经不是FlutterApplication而是我自己的Application,我该如何初始化flutter_boost??? |
I hope I have understood your problem correctly. We haven't tried this before. I believe there is some way to do it. The flutter_boost contains three kinds of source code for Dart, iOS, and Android. In my understanding, you could first download the source package(flutter packages get helps you to do that) and save it somewhere then you will probably need to config dependency for each kind of source respectively. Dartyou just need to add flutter_boost to dependency section normally. iOSTry to add a dependency in your Podfile pointing source under flutter_boost/ios/Classes AndroidConfig your Gradle build file pointing to source under flutter_boost/android |
@nightwolf-chen 对,你理解的正确,我问的就是这一步的操作: |
@nightwolf-chen 我觉得我说的这种接入方式,你们文档最好还是能够完善一点,因为现在很多都是在原有的Native过程里面接入Flutter module,而不是采取现有的Flutter工程,这是由于以前已有Native 工程的限制,而你的demo文档是直接在flutter工程接入flutter_boost |
我把aos的代码全部copy到native工程,自己的flutte_module只是加了个一个 dependency:flutter_boost。 |
推荐将Application改成FlutterApplication,但如果原来的工程已经有自定义的Application,也可以在onCreate方法中加入:FlutterMain.startInitialization(this); 如果想在现有工程的基础上引入Flutter做混合开发有两种思路: 两种都有官方支持,也都可以接入flutter_boost . 推荐使用第二种,实施简单,也可以较方便的桥接原生工程的能力。 |
请问我将
请问下,就安卓来说: |
====答===== |
@Yacumima 你好,plugin生成的aar如何管理?如果用maven的话,就要把所有的plugin都上传,有没有比较高效的方案?或者有比较好的reference可以借鉴。谢谢! |
谢谢!我再去试试。 |
是的,我们现在也是依赖maven来管理,只是通过定制的gradle插件实现了自动化依赖而已。如果有更好的思路,欢迎和我们分享交流~ |
@ruanchaohouzi 请问您在自己的application中初始化成功了吗? 我的是MyApplicationLike (extend DefaultApplicationLike 集成的tinker application) 不是继承的FlutterApplication ,编译时报错不兼容的类型: MyApplicationLike无法转换为Application,请问您遇到过吗,有解决吗?谢谢 |
这个默认的吗,还是哪里配置,我也有这个路径,怎么一编译,会自动出来个.android文件夹? |
具体怎么搞的,native和flutter页面跳来跳去,怎么搞呢,性能如何? |
采用flutter 官方方案在原生android项目引入flutter_boost(app gradle里面include:flutter_boost)后,本地能编译通过,编译集群上面报Could not resolve project :flutter_boost. 需要做什么配置吗? |
@Yacumima 请教一下方案二,将现有Android和iOS工程分别替换工程中的Android和iOS文件夹之后还需要哪些操作才能完成集成?如果有资料链接可以参考下就更好了,搜索到资料没有涉及这种场景。十分感谢🙏 |
再问一个问题,如果我把Flutter工程加入到已有的NativeAPP中 ,采取官方的集成方式https://github.com/flutter/flutter/wiki/Add-Flutter-to-existing-apps 请问Native工程如何接入flutter_boost???
The text was updated successfully, but these errors were encountered: