Flutter 安装 [ 环境:linux 16.04 64bit ]

这篇博客详细介绍了如何在Linux 16.04系统上安装Flutter SDK,包括安装curl,解压并配置Flutter环境,运行flutter doctor检查依赖,安装Android Studio以及Dart和Flutter插件的过程。通过这些步骤,确保开发者能够成功配置Flutter开发环境。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

安装 curl :  [ 当时随便安装的 ,可能不需要]

1.获得安装包,从网上直接下载或者其他途径,这里直接wget

wget http://curl.haxx.se/download/curl-7.20.0.tar.gz

2.解压到当前目录(或者 http://www.linuxidc.com/Linux/2014-08/106022.htm

 tar -zxf curl-7.20.0.tar.gz

3.进入解压后的目录内

  cd curl-7.17.1

4.配置,指定安装的目录,这里是“/usr/local/curl”

 ./configure --prefix=/usr/local/curl
 make

5.安装 
sudo make install

原文:https://flutter.dev/docs/get-started/install/linux

---------------------------------------------------------------------

安装 flutter SDK

下载 at: https://flutter.dev/docs/get-started/install/linux

  1. Extract the file in the desired location, for example:

    content_copy
    $ cd ~/development
    $ tar xf ~/Downloads/flutter_linux_v1.5.4-hotfix.2-stable.tar.xz
    
  2. Add the flutter tool to your path:

    content_copy
    $ export PATH="$PATH:`pwd`/flutter/bin"
    

    This command sets your PATH variable for the current terminal window only.

  3. Optionally, pre-download development binaries:

    The flutter tool downloads platform-specific development binaries as needed. For scenarios where pre-downloading these artifacts is preferable (e.g., hermetic build environments, intermittent network availability), iOS and Android binaries can be downloaded ahead of time by running:

    content_copy

    $ flutter precache
    

Run flutter doctor

Run the following command to see if there are any dependencies you need to install to complete the setup (for verbose output, add the -v flag):

content_copy

$ flutter doctor

This command checks your environment and displays a report to the terminal window. The Dart SDK is bundled with Flutter; it is not necessary to install Dart separately. Check the output carefully for other software you may need to install or further tasks to perform (shown in bold text).

For example:

content_copy

[-] Android toolchain - develop for Android devices
    • Android SDK at /Users/obiwan/Library/Android/sdk
    ✗ Android SDK is missing command line tools; download from https://goo.gl/XxQghQ
    • Try re-installing or updating your Android SDK,
      visit https://flutter.dev/setup/#android-setup for detailed instructions.

The following sections describe how to perform these tasks and finish the setup process.

Once you have installed any missing dependencies, run the flutter doctor command again to verify that you’ve set everything up correctly.

The flutter tool uses Google Analytics to anonymously report feature usage statistics and basic crash reports. This data is used to help improve Flutter tools over time. Analytics is not sent on the very first run or for any runs involving flutter config, so you can opt out of analytics before any data is sent. To disable reporting, type flutter config --no-analytics and to display the current setting, type flutter config. See Google’s Privacy Policy.

 

--------------------------------------------------------------

安装 Android  studio

1. 下载地址  http://www.android-studio.org/index.php/88-download/

本人下载的 linux版本 

Linuxandroid-studio-ide-183.5522156-linux.tar.gz

2.解压Android Studio
        tar -zxf android-studio-ide-183.5522156-linux.tar.gz
3.移动Android Studio到存放目录 [可以自己选择]
        sudo mv android-studio /opt/
4.执行 [根据自己选择的解压路径更改]
    cd  /opt/android-studio/bin/
5. 安装

       ./studio.sh

       这样 ,絮絮叨叨的安装就开始啦 ~。~

      如果之前没有装android sdk 也会自动下载,很快很方便。

6.安装结束 ,再次运行 studio.sh

    可以看到 studio 启动啦 ,然后这个时候在启动器AS图标上右键 -> 锁定到启动器 -> 完活儿

     ---》原文:https://blog.youkuaiyun.com/nailsoul/article/details/81334420 
 

------------------------------------------------------------------------

再次回到 flutter目录 ,export PATH="$PATH:`pwd`/flutter/bin"

然后 flutter doctor

di@di-pc:~/work$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Linux, locale zh_CN.UTF-8)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
[!] Android Studio (version 3.4)
    ✗ 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.

--------------------------------------------------------------

安装 Dart 和 Flutter 插件

运行 AndroidStudio -> configure -> 搜索 Dart 安装 

                                   configure -> 搜索 flutter 安装 

-------------------------------------------------------------------

然后 连个手机,再次运行 flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Linux, locale zh_CN.UTF-8)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
[✓] Android Studio (version 3.4)
[✓] Connected device (1 available)

• No issues found!

------------------------------------------------------------------

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值