繁体   English   中英

使用 flutter 从 android 项目(java/kotlin)构建 iOS 应用程序

[英]Build iOS app from android project (java/kotlin) with flutter

谢谢阅读,

my original project is android project in java, then kotlin being integrated into project, now all new ui and business logic are written in kotlin, recently boss want this android app to be use by ios,

then i found flutter might be useful in this case, so i try to integrate flutter into project and test with it, my goal is to convert this project to be able to compile into android and ios, i'm very new to flutter,

经过几天的搜索和测试,

i'm follwing guide at flutter.dev added flutter module to my android project, now able to call FlutterActivity from android activity, using flutterEngine initialRoute i'm able to call different dart file from flutter module, but as i dive deeper i feel that这些好像都不对

如果我错了请纠正我=

  1. i'm unable to call kotlin files from flutter module in dart, (i have rewrite business logic in dart at flutter module?

  2. dart 没有 ui 文件,我无法像 xml 设计视图那样预览 ui,

  3. 该指南似乎只是专注于让 flutter 在现有的 android 应用程序中运行,(所以这个 android 项目仍然无法编译成 Z9E304094E8DF198428C

我的主要目标是将现有的 android 项目编译为 ios 并尽可能不重新制作每个编码,但到目前为止,我找到的所有解决方案都告诉我这个项目必须重新制作,对不起,我没有选择,我需要帮助,如果有更好的解决方案,我真的不需要 flutter,

请建议我如何转换这个项目以便能够在 android 和 ios 上编译?

如果你想知道 flutter 是如何工作的,它与 kotlin 有什么区别,我强烈建议你看看这个链接: https://flutter.dev/docs/get-started/flutter-节省大量时间。 if I want to briefly reply your questions: in flutter you do not need code native code using kotlin or swift, you just write one code in dart language and when you build your app you have both ios and android sourse. 正如谷歌所说:Flutter 是谷歌的 UI 工具包,用于从单个代码库构建漂亮的、本机编译的移动应用程序、web 和桌面应用程序。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM