zoukankan      html  css  js  c++  java
  • mac安装flutter

    1、梯子

    2、安装brew

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

    3、下载flutter(记住flutter/bin的路径,配置环境变量)

    https://flutter.io/setup-macos/

    4、配置环境变量

    vim ~/.bash_profile
    
    输入:export PATH=“/flutter bin路径”:$PATH
    
    :wq(退出)
    
    enter

    5、环境变量生效

    source ~/.bash_profile

    6、检测是否安装完成

    flutter -h

    7、检测开发环境

    flutter doctor

    8、安装studio 

        安装之前要安装java
        http://www.android-studio.org/

    9、终端输入命令

    brew install --HEAD libimobiledevice
    
    brew install ideviceinstaller
    
    brew install ios-deploy
    
    brew install cocoapods
    
    pod setup

    10、启动andriod studio

    plugins中搜索flutter
    
    下载flutter

    11、创建flutter项目

    打开andriod studio
    
    start a new flutter project(好慢)
    
    选择flutter application
    
    安装avd虚拟机
    
    tool - avd manager
    
    create virtual device
    
    nexus 5x    andriod 9
    
    next

    12、debug

    报错
    
    修改掉项目下的android目录下的build.gradle文件
    
    maven { url 'https://maven.aliyun.com/repository/google' }
            maven { url 'https://maven.aliyun.com/repository/jcenter' }
            maven { url ‘http://maven.aliyun.com/nexus/content/groups/public'}
    
     
    
    Flutterflutterpackagesflutter_toolsgradle
    
     
    
    maven { url 'https://m    aven.aliyun.com/repository/google' }
            maven { url 'https://maven.aliyun.com/repository/jcenter' }
            maven { url ‘http://maven.aliyun.com/nexus/content/groups/public'}

    13、配置vscode

    vscode -> 查看 -> 命令面板 -> Flutter: new project -> 输入项目名称
    点击no device
    flutter create app-name
    找到main.dart文件,点击vscode右下方device
  • 相关阅读:
    快速入门系列--MVC--05行为
    2015链家网面试记录
    快速入门系列--MVC--04模型
    django 添加动态表格的方法
    git clone
    postgresql数据库实用操作
    django 实战
    Android手机分辨率基础知识(DPI,DIP计算)
    Android中xml设置Animation动画效果详解
    Unable to execute dex: Multiple dex files define Lcom/gl
  • 原文地址:https://www.cnblogs.com/shui1993/p/11128918.html
Copyright © 2011-2022 走看看