Help us understand the problem. What is going on with this article?

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

More than 1 year has passed since last update.

はじめに

ちょっと長いので根気よく行きましょう:relaxed:

1、FlutterSDK install

Flutter公式 mac版

基本的には公式にやり方が書いてあります
ホームディレクトリで解凍してあげてください

2、PATH set

## Flutter PATH
export PATH=/Users/user_name/flutter/bin:$PATH

$ source .bash_profileで反映(.bashrcなど個人の環境に合わせてください)

3、AndroidStudio & Xcode install

Android Studio install and setup

AndroidStudioは3.2以上を使用してください

【公式】AndroidStudio download

brewでのインストール

$ brew cask install android-studio

AndroidSDKインストール

AndroidStudioを使って以下をインストールします

Preferences -> Appearance & Behavior -> System Settings -> Android SDK

SDK Platforms -> 各Android API
SDK Tools -> Android SDK Build-Tools

Build-Toolsは28.0.3以降を使用します(Flutter推奨)

ライセンスへの同意

インストール後は以下のコマンドでライセンスに同意します

$ flutter doctor --android-licenses

Xcode install

Xcodeは10.1以上(MacOSは10.13.6以降)

【公式】Apple developer download

Xcode command-line tools install

$ sudo  xcode-select --switch /Applications/Xcode.app/Contents/Developer from the command line.

ライセンスへの同意

$ sudo xcodebuild -license from 

4、flutter doctor check

各設定が終わったら$ flutter doctorでチェックします
原則エラーとか出てなければオッケーです
VS Codeはこの説明では使わないのでスルーします
Connected deviceはAndroidやiOSのシュミレータが起動していればエラーとか出なくなります

$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v1.2.1-pre.201, on Mac OS X 10.13.6 17G4015, locale ja-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
[✓] Android Studio (version 3.3)
[!] VS Code (version 1.29.1)
    ✗ Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[!] Connected device
    ! No devices available

5、AndroidStudio setup

これやらないとAndroidStudioでの開発ができないのでやってください

plugins install

Preferences -> Plugins
1. Dart
2. Flutter

それぞれをsearchでinstall

まとめ

はい、これでお使いのMacでAndroidStudioを使うFlutter開発の環境が構築できました!にっこり:relaxed:

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした