赞
踩
1.下载vscode(自行下载)
2.在vscode的应用商店中安装flutter插件和dart插件(在应用商店搜索框搜索即可)
3.下载android studio
4.下载flutter sdk
下载地址: https://flutter.dev/docs/development/tools/sdk/releases ,拼接到用户变量Path的后面(记得加分号;)就可以使用flutter命令了,比如我的是:
D:\flutter\flutter\bin
运行 flutter doctor命令
flutter doctor
该命令是用来查看是否还需要安装其它依赖,如果需要,安装它们
5.在android studio中下载安卓模拟器
6.回到vscode,ctrl+shift+p,输入new project,选中flutter new project创建flutter项目
7.等待项目创建完成后,切换到lib/main.dart文件,按F5,选中弹出的安卓模拟器(就是刚刚在android studio上下载的)
8.等待调试完成后,项目就创建完成了
PS:项目调试的过程中遇到了一个问题
- FAILURE: Build failed with an exception.
-
- * What went wrong:
- Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
- > Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
- > Could not GET 'https://storage.googleapis.com/download.flutter.io/io/flutter/x86_debug/1.0.0-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32/x86_debug-1.0.0-6bc433c6b6b5b98dcf4cc11aff31cdee90849f32.pom'.
- > Connect to storage.googleapis.com:443 [storage.googleapis.com/34.64.4.80] failed: Connection timed out: connect
-
- * Get more help at https://help.gradle.org
-
这里有解决方法:https://blog.csdn.net/jiayang_Sir/article/details/106355682
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。