簡體   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