深入小程序系列之二、Flutter 和小程序混编


  • administrators

    背景

    本文我们将开一下脑洞,在 Flutter 工程基础上下集成及运行小程序方案。

    先看一下效果如下:

    新建 Flutter 样例工程

    Flutter 的安装

    Flutter 的安装可参考https://flutterchina.club/get-started/install/具体上主要执行以下三步即可。本文将使用 Flutter1.12.hotfix8 稳定版作为开发环境。

    ·下载 FlutterSDK

    ·配置 PATH 环境路径

    ·flutter doctor 检查环境

    新建 Flutter 工程

    flutter create --template=app --org=com.finogeeks.flutter --project-name=mini_flutter -i objc -a java ./mini_flutte
    

    执行以上命令后,正常将会提示以下信息

    All done!
    [✓] Flutter: is fully installed. (Channel stable, v1.12.13+hotfix.8, on Mac OS X 10.15.3 19D76, locale zh-Hans-CN)
    [✓] Android toolchain - develop for Android devices: is fully installed. (Android SDK version 29.0.3)
    [✓] Xcode - develop for iOS and macOS: is fully installed. (Xcode 11.3.1)
    [✓] Android Studio: is fully installed. (version 3.6)
    [!] IntelliJ IDEA Ultimate Edition: is partially installed; more components are available. (version 2019.3.3)
    [✓] VS Code: is fully installed. (version 1.42.1)
    [!] Proxy Configuration: is partially installed; more components are available.
    [✓] Connected device: is fully installed. (1 available)
    
    Run "