ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

flutter

2022-04-19 01:33:08  阅读:203  来源: 互联网

标签:iOS Flutter install brew Android flutter


一、安装Flutter

1、官网下载

2、添加flutter相关工具到path中

export PATH=`pwd`/flutter/bin:$PATH
 PS:   在 shell 中执行程序时,shell 会提供一组环境变量。export 可新增,修改或删除环境变量,供后续执行的程序使用。export 的效力仅限于该次登陆操作。   'pwd' 命令用于查看当前工作目录的完整路径

3、执行命令 

flutter doctor

运行以下命令查看是否需要安装其它依赖项来完成安装:

4、永久更新环境此变量,以便可以运行flutter命令在任何终端会话中。(步骤2的进阶) 《1》进入路径/Users/mac 《2》修改隐藏文件.bash_profile 前两条是设置国内镜像站点(提高下载速度),第三条是
export PUB_HOSTED_URL=https://pub.flutter-io.cn  // 国内用户需要设置
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn  // 国内用户需要设置
export PATH=/Users/mac/Documents/Flutter/flutter/bin:$PATH  // /Users/mac/Documents/Flutter是我的flutter安装包路径

二、使用

运行flutter doctor

Checking Android licenses is taking an unexpectedly long time...⣟ideviceinstaller not found. To work with iOS devices, please install
ideviceinstaller. To install, run:
brew install ideviceinstaller.
[!] Android toolchain - develop for Android devices (Android SDK version 27.0.3)
    ✗ Flutter requires Android SDK 28 and the Android BuildTools 28.0.3
      To update using sdkmanager, run:
        "/Users/mac/Library/Android/sdk/tools/bin/sdkmanager"
        "platforms;android-28" "build-tools;28.0.3"
      or visit https://flutter.dev/setup/#android-setup for detailed
      instructions.
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor
      --android-licenses
[!] Xcode - develop for iOS and macOS (Xcode 10.3)
    ! CocoaPods out of date (1.6.0 is recommended).
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin
        code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To upgrade:
        brew upgrade cocoapods
        pod setup
[!] iOS tools - develop for iOS devices
    ✗ Verify that all connected devices have been paired with this computer in
      Xcode.
      If all devices have been paired, libimobiledevice and ideviceinstaller may
      require updating.
      To update with Brew, run:
        brew update
        brew uninstall --ignore-dependencies libimobiledevice
        brew uninstall --ignore-dependencies usbmuxd
        brew install --HEAD usbmuxd
        brew unlink usbmuxd
        brew link usbmuxd
        brew install --HEAD libimobiledevice
        brew install ideviceinstaller
    ✗ ios-deploy not installed. To install:
        brew install ios-deploy
[!] Android Studio (version 3.1)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[!] IntelliJ IDEA Ultimate Edition (version 2018.1.6)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] Connected device (2 available)

 

标签:iOS,Flutter,install,brew,Android,flutter
来源: https://www.cnblogs.com/liyonghua/p/11256623.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有