Windows下安装配置flutter 安装flutter 使用git命令克隆dev版本的Flutter到本地
1 git clone -b dev https://github.com/flutter/flutter.git
环境变量配置 在系统环境变量中找到Path,在最后添加Flutter的bin目录路径,例如:
配置国内镜像 二选一
1 2 3 4 5 6 7 FLUTTER_STORAGE_BASE_URL: https://mirrors.sjtug.sjtu.edu.cn PUB_HOSTED_URL: https://dart-pub.mirrors.sjtug.sjtu.edu.cn FLUTTER_STORAGE_BASE_URL: https://storage.flutter-io.cn PUB_HOSTED_URL: https://pub.flutter-io.cn
运行
问题及解决办法
模拟器 推荐雷电模拟器 ,可以直接识别到
flutter android-studio 连接模拟器(已废弃) 进入android-studio SDK目录F:\AndroidSDK\platform-tools
1 cd F:\AndroidSDK\platform-tools
连接模拟器
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 adb connect 127.0.0.1:62001 adb connect 127.0.0.1:21503 adb connect 127.0.0.1:6555 adb connect 127.0.0.1:53001 adb connect 127.0.0.1:7555 adb connect (你的IP地址):5555 adb connect 192.168.1.100:5555 (我这边是这个)
运行项目
1 flutter run --enable-software-rendering
Linux下安装配置flutter 1 2 3 4 5 6 export PUB_HOSTED_URL=https://pub.flutter-io.cnexport FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn git clone -b dev https://github.com/flutter/flutter.gitexport PATH="$PWD /flutter/bin:$PATH " cd ./flutter flutter doctor