使用 Swift 和 Kotlin 重新创建 Flutter 的 ios 和 android 文件夹

2024-05-25

您好,我刚刚发现可以使用 Swift 和 Kotlin 创建 Flutter 项目。但是,我已经投资了当前的项目,并希望重新创建ios and android如 Swift 和 Kotlin(目前默认为 Java 和 ObjC)。

Thanks.


use -i and -a创建新项目,如下所示:

flutter create -i swift -a kotlin project_name

see also:https://docs.flutter.dev/development/platform-integration/platform-channels#example-project https://docs.flutter.dev/development/platform-integration/platform-channels#example-project enter image description here then replace with lib folder from old project.


更新2020.01.13
swift 和 kotlin 现在是默认的。您可以使用这些命令来更新现有项目:

cd project
flutter create .

该命令将更新你的项目。然后您可以将旧代码合并到新项目中,并删除旧代码。
确保在运行项目之前对其进行备份,并且您知道自己到底在做什么

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

使用 Swift 和 Kotlin 重新创建 Flutter 的 ios 和 android 文件夹 的相关文章