![](/style/images/good.png)
![](/style/images/bad.png)
Flutter学习-入门
source link: https://www.cnblogs.com/Tu9oh0st/p/13902518.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Flutter安装
参考官网文档即可:https://flutter.dev/docs/get-started/install
使用Flutter docter命令来检测环境配置
如果缺少某一个组建,请仔细检查一下。
使用vscode搭建项目并运行
vscode 需要使用Dart
和Flutter插件
,安装即可。
使用command + shift + p
,输入Flutter new project
来创建新的项目。
项目创建好之后,需要修改build.gradle
中的repositories
内容(如果是国内的话)。
repositories {
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' }
}
此外,运行的时候还需要修改环境变量。
比如我的linux,我需要在etc/profile
中添加如下
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
当项目build完成的时候
使用vscode的运行即可运行
__EOF__
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK