当前位置: 首页>移动开发>正文

flutter flutter build ios 如何安装 flutter安装教程

作为一个面对120fps慕名而来的小白,被网上五花八门的教程迷的晕头转向,最后发现,还是官方文档最靠谱,就此归纳本人windows端的配置爬坑

1.访问https://flutterchina.club/setup-windows/,下载Flutter SDK

2.安装我们的专属版镜像,镜像可有千秋,我选择官方。在搜索栏输入env,添加用户变量

PUB_HOSTED_URL https://pub.flutter-io.cn;FLUTTER_STORAGE_BASE_URL https://storage.flutter-io.cn

flutter flutter build ios 如何安装 flutter安装教程,flutter flutter build ios 如何安装 flutter安装教程_开发者,第1张

flutter flutter build ios 如何安装 flutter安装教程,flutter flutter build ios 如何安装 flutter安装教程_flutter_02,第2张

3.用户path新增flutter sdk 的安装路径,选到bin这一级,我的安装目录是D:\flutter\bin;

flutter flutter build ios 如何安装 flutter安装教程,flutter flutter build ios 如何安装 flutter安装教程_flutter_03,第3张

4.安装Android Studio,http://www.android-studio.org/,要注意,一路 NEXT下去(好奇是好事,但那是大神才驾驭的住的)

5.打开Android Studio>File>Settings>Plugins,搜索Flutter和Dart,不过我奇怪我下了flutter,它自动给我下载了Dart

接下来是重头戏了,卡了我一个多星期的坑!!!

6.安装android sdk,打开Android Studio>Tools>SDK Manager,SDK Platforms我下的是安卓9.0,大家都说安卓是向下兼容的,小白不晓得,但小心终归好点~~

flutter flutter build ios 如何安装 flutter安装教程,flutter flutter build ios 如何安装 flutter安装教程_flutter_04,第4张

然后SDK Tools 我下的是,如下图,我觉得 USB Driver很重要!!!

flutter flutter build ios 如何安装 flutter安装教程,flutter flutter build ios 如何安装 flutter安装教程_Android_05,第5张

7.android sdk 配置,照旧搜索框输入env,添加用户变量,ANDROID_HOME 这是我的安装路径,上图有说明,这个路径哪儿找,C:\Users\Administrator\AppData\Local\Android\Sdk

flutter flutter build ios 如何安装 flutter安装教程,flutter flutter build ios 如何安装 flutter安装教程_flutter_06,第6张

系统Path 添加;%ANDROID_HOME%\platform-tools;%ANDROID_HOME%\tools;

好了,现在万事俱备,我们打开我们的flutter安装目录,打开命令行,运行flutter doctor -v

flutter flutter build ios 如何安装 flutter安装教程,flutter flutter build ios 如何安装 flutter安装教程_Android_07,第7张

没有X,配置成功,有X的话,说明你哪一步没有成功

8.由于Android Studio 里面的模拟器性能是真高,而公司电脑一般般,我只能另辟蹊径,选择了传说中的雷电模拟器,https://www.ldmnq.com/,直接下载安装

9.打开模拟器,点击设置>关于手机,连击六次版本号,打开开发者选项,然后进入开发者选项打开USB调试

10.在雷电模拟器安装目录打开命令行工具,输入 adb connect 127.0.0.1:5555,如下图所示,已经连接成功,可以进入Android Studio运行我们的第一个flutter程序了

flutter flutter build ios 如何安装 flutter安装教程,flutter flutter build ios 如何安装 flutter安装教程_Android_08,第8张

11.大功告成!!!

flutter flutter build ios 如何安装 flutter安装教程,flutter flutter build ios 如何安装 flutter安装教程_开发者_09,第9张



https://www.xamrdz.com/mobile/4xj1987401.html

相关文章: