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

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

1.得到安装包,从网上直接下载或者其余途径,这里直接wgetphp

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

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

tar -zxf curl-7.20.0.tar.gz

3.进入解压后的目录内linux

cd curl-7.17.1

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

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

5.安装 
sudo make installios

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

---------------------------------------------------------------------curl

安装 flutter SDK

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

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

    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:this

    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版本 

Linux android-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.csdn.net/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!

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