0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

MacにFlutterの開発環境を構築する

Last updated at Posted at 2021-02-28

FlutterのダウンロードとPATH設定

FlutterをMac環境にインストールする手順は以下の通りです

SDKのダウンロード

以下のURLからFlutterのzipファイルをダウンロードします

2021/03/04時点の最新はflutter_macos_2.0.1-stable.zip
https://flutter.dev/docs/get-started/install/macos

SDKのインストール

ダウンロードしたzipファイルを任意のフォルダに解凍します
(ここでは「~/development」に解凍する)


$ cd ~/development
$ unzip ~/Downloads/flutter_macos_2.0.1-stable.zip

PATHの設定

Flutterを使用するためのPATHを設定します


$ export PATH="$PATH:~/development/flutter/bin"

必要に応じて、~/.bash_profile または ~/.zprofileを開いて上記のPATHを追加します
記述したら設定の反映をします
(ここでは~/.bash_profileに設定を追加)


$ source ~/.bash_profile

これでFlutterのダウンロードとPATH設定は終わりです

doctorの実行

ここまで完了したら、次にdoctorコマンドを実行して必要な設定やアプリの確認をします。

flutter doctorの実行

flutter doctorを実行します


$ flutter doctor

実行が終わると次のような結果が表示されます

$ flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.6, on macOS 11.0.1 20B50 darwin-x64, locale
    ja-JP)
 
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor
      --android-licenses
[✓] Xcode - develop for iOS and macOS (Xcode 12.4)
[!] Android Studio (version 4.0)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.53.2)
[!] Connected device
    ! No devices available

! Doctor found issues in 3 categories.

!になっている項目を確認して、インストールする必要がある場合はインストールします

これでFlutterの開発環境の構築は終わりです。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?