flutter(4):在linux 下安装flutter 环境,sdk,Android Studio ,从中文镜像网站下载,速度快,安装插件,调整bios使用x86镜像,写个hello world。

前言


相关arduino 全部分类:
https://blog.csdn.net/freewebsys/category_8957746.html

本文的原文连接是:
https://blog.csdn.net/freewebsys/article/details/104242070

未经博主允许不得转载。
博主地址是:http://blog.csdn.net/freewebsys

1,关于 flutter


使用Android Studio 做开发,还好这个几个工具都有国内的镜像了。

Studio 从这里下载:

https://developer.android.google.cn/studio

速度超级快,解决了不少问题。

flutter 从这里下载也是国内镜像地址:

https://flutter.cn/docs/get-started/install

2,使用


配置 Android SDK 环境,还好这个网络速度快。
在这里插入图片描述

打开bios 的虚拟化技术。
主板不一样其BISO中显示关键词也不一样的,主要是找到Virtual或Virtualization将其设置为Enabled。

然后就可以使用 Android SDK 的 X86 镜像了。这个是速度比 ARM 的镜像快。


配置环境变量:

export PATH="$PATH:/media/test/NewDisk1/opt/flutter/bin"
export ANDROID_HOME="/media/test/NewDisk1/opt/android-sdk"
# add from https://flutter.cn/
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
export PUB_HOSTED_URL=https://pub.flutter-io.cn

使用flutter doctor 可以检查flutter 环境状况:

 flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.7, on Linux, locale zh_CN.UTF-8)
[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/setup/#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, set ANDROID_HOME to that location.
      You may also want to add it to your PATH environment variable.

[!] Android Studio (version 3.5)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.

Android Studio 安装插件:


有的时候会网络环境不好,多尝试几次,或者晚上早晨人少的时候再实验。

都弄好了,再使用 flutter doctor 命令:

$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.7, on Linux, locale zh_CN.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Android Studio (version 3.5)
[!] IntelliJ IDEA Community Edition (version 2019.3)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.

这样就说明所有的环境和IDE 工具都可以了。

3,启动


然后就可以创建第一个工程了:
在这里插入图片描述
在IDE 里面可以看到flutter 项目了。

5,学习视频


都是成熟的技术,也不用搜资料了,直接看 网易的视频吧

https://study.163.com/course/courseMain.htm?courseId=1209427872

6,总结


flutter 现在已经非常的成熟了,都1.12 了。
而且有国内的网站,可以直接访问,下载工具速度也挺快的了。除了安装插件,其他都挺快的。
自己开发个简单的应用,可以使用下。

本文的原文连接是:
https://blog.csdn.net/freewebsys/article/details/104242070

博主地址是:https://blog.csdn.net/freewebsys

发布了639 篇原创文章 · 获赞 260 · 访问量 211万+

猜你喜欢

转载自blog.csdn.net/freewebsys/article/details/104242070