标签:art cos 命令 依赖 效果图 hosted idea UNC not
一.、使用git克隆Flutter,命令:gitclone -b beta https://github.com/flutter/flutter.git;
二、从官网下载flutter,https://flutter.io/setup-macos/;
在当前用户目录下创建.bash_profile文件,如果该文件已经存在,则直接打开.
open -e .bash_profile
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
export PATH=/Users/hujintao/flutter/bin:$PATH
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/emulator
export RN=/usr/local/bin
export PATH=$RN:$PATH
GRADLE_HOME=/Users/Apple/Desktop/soft/gradle/gradle-4.6
export GRADLE_HOME
export PATH=$PATH:$GRADLE_HOME/bin
export NVM_DIR=~/.nvm
source $(brew --prefix nvm)/nvm.sh
终端执行命令flutter doctor
检测安装依赖
? libimobiledevice and ideviceinstaller are not installed. To install with
Brew, run:
brew update
brew install --HEAD 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.4)
? 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.4)
? Flutter plugin not installed; this adds Flutter specific functionality.
? Dart plugin not installed; this adds Dart specific functionality.
[!] VS Code (version 1.35.1)
? Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
解决方案:打开android studio, 打开plugin;
输入flutter搜索,点击中间的 Search in repositories;
需要安装两个插件:
配置模拟器
Run the app
//终端下建个文件夹,用命令创建一个flutter项目
1. flutter create myapp
//进入项目
2. cd myapp
//run起来
3. flutter run
flutter run -d all
标签:art cos 命令 依赖 效果图 hosted idea UNC not
原文地址:https://www.cnblogs.com/StevenHuSir/p/Flutter-huan-jing-bian-liang-pei-zhi.html