Flutterのインストール - Flutter SDK [Flutter]
iOSとAndroidのアプリが作れて、開発者とデザイナーが協業できると言う
FlutterをGDG京都の勉強会で試してみることになりました。
今回は女子会 (WTM京都)です。WTMは、Women Techmakersの略で、
コミュニティとしては、京都と九州にあります。
予習を兼ねてセットアップしたので、そのメモです。
まずは、Flutter SDKインストールからです。
下記のサイトで自分の環境を選択します。私はMacです。
Flutter installation & setup
https://flutter.io/setup/
必要とされる環境のスペックなど。
OS: macOS (64-bit)
・ディスクの空き容量 700 MB (Xcode や Android Studio用のディスク容量は含まない).
・Tools:Flutterは、ご使用の環境で使用可能なこれらのコマンドラインツールに依存します。
・bash, mkdir, rm, git, curl, unzip, which
FlutterのSDKをインストール
Flutterをインストールする際に、リポジトリのクローンや、
Flutterのツールを使う為にGitを利用します。
まず、Gitでクローンします。
一番最初のFlutterのインストールなら、ブランチのアルファブランチの
リポジトリにクローンして、PATHにFlutterを加えます。
$ git clone -b alpha https://github.com/flutter/flutter.git
こんな感じの表示が出ます。
remote: Counting objects: 92523, done.
remote: Compressing objects: 100% (247/247), done.
remote: Total 92523 (delta 609), reused 550 (delta 520), pack-reused 91750
Receiving objects: 100% (92523/92523), 27.52 MiB | 1.50 MiB/s, done.
Resolving deltas: 100% (68242/68242), done.
PATHの設定
PATH変数を一時的に設定します。
$ export PATH=`pwd`/flutter/bin:$PATH
Flutterをパスに永続的に追加するには、パスを更新するを参照してください。
リンク先に、ホーム直下の.bash_profileを編集する話が掲載されています。
要は、.bash_profileに以下を追加します。.bash_profileがない場合は作成します。
export PATH=$HOME/flutter/bin:$PATH
リフレッシュします。
$ source $HOME/.bash_profile
次のコマンドを実行して、flutter / binディレクトリがPATHにあることを確認します。
$ echo $PATH
既存のバージョンのFlutterを更新するには、「Flutterのアップグレード」を参照する。
flutter doctorで、インストールが必要なものを確認
Flutter doctorをコマンドラインで走らせると、インストールが必要な残りの
依存関係がすべて表示されます。
$ flutter doctor
Running flutter doctor...
[✓] Flutter (on Mac OS X 10.12.5 16F73, locale ja-JP, channel alpha)
• Flutter at /Users/fum/flutter
• Framework revision d36e2f6191 (8 days ago), 2017-06-21 15:09:10 -0700
• Engine revision b0dee695ec
• Tools Dart version 1.24.0-dev.6.7
[✓] Android toolchain - develop for Android devices (Android SDK 22.0.1)
• Android SDK at /Users/fum/Library/Android/sdk
• Platform android-22, build-tools 22.0.1
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)
[-] iOS toolchain - develop for iOS devices (Xcode 8.3.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 8.3.2, Build version 8E2002
✗ libimobiledevice and ideviceinstaller are not installed or require updating. To update, run:
brew update
brew uninstall --ignore-dependencies libimobiledevice
brew install --HEAD libimobiledevice
brew install ideviceinstaller
✗ ios-deploy not installed. To install:
brew update
brew install ios-deploy
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS.
For more info, see https://flutter.io/platform-plugins
To install:
brew update
brew install cocoapods
pod setup
[✓] Android Studio (version 2.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Gradle version 3.2
• Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)
[✓] Connected devices
• None
必要なものを入れないと色々後で面倒なので、ここでインストールをお勧めします。
次は、IntelliJのインストールと設定と続きます。
FlutterをGDG京都の勉強会で試してみることになりました。
今回は女子会 (WTM京都)です。WTMは、Women Techmakersの略で、
コミュニティとしては、京都と九州にあります。
予習を兼ねてセットアップしたので、そのメモです。
まずは、Flutter SDKインストールからです。
下記のサイトで自分の環境を選択します。私はMacです。
Flutter installation & setup
https://flutter.io/setup/
必要とされる環境のスペックなど。
OS: macOS (64-bit)
・ディスクの空き容量 700 MB (Xcode や Android Studio用のディスク容量は含まない).
・Tools:Flutterは、ご使用の環境で使用可能なこれらのコマンドラインツールに依存します。
・bash, mkdir, rm, git, curl, unzip, which
FlutterのSDKをインストール
Flutterをインストールする際に、リポジトリのクローンや、
Flutterのツールを使う為にGitを利用します。
まず、Gitでクローンします。
一番最初のFlutterのインストールなら、ブランチのアルファブランチの
リポジトリにクローンして、PATHにFlutterを加えます。
$ git clone -b alpha https://github.com/flutter/flutter.git
こんな感じの表示が出ます。
remote: Counting objects: 92523, done.
remote: Compressing objects: 100% (247/247), done.
remote: Total 92523 (delta 609), reused 550 (delta 520), pack-reused 91750
Receiving objects: 100% (92523/92523), 27.52 MiB | 1.50 MiB/s, done.
Resolving deltas: 100% (68242/68242), done.
PATHの設定
PATH変数を一時的に設定します。
$ export PATH=`pwd`/flutter/bin:$PATH
Flutterをパスに永続的に追加するには、パスを更新するを参照してください。
リンク先に、ホーム直下の.bash_profileを編集する話が掲載されています。
要は、.bash_profileに以下を追加します。.bash_profileがない場合は作成します。
export PATH=$HOME/flutter/bin:$PATH
リフレッシュします。
$ source $HOME/.bash_profile
次のコマンドを実行して、flutter / binディレクトリがPATHにあることを確認します。
$ echo $PATH
既存のバージョンのFlutterを更新するには、「Flutterのアップグレード」を参照する。
flutter doctorで、インストールが必要なものを確認
Flutter doctorをコマンドラインで走らせると、インストールが必要な残りの
依存関係がすべて表示されます。
$ flutter doctor
Running flutter doctor...
[✓] Flutter (on Mac OS X 10.12.5 16F73, locale ja-JP, channel alpha)
• Flutter at /Users/fum/flutter
• Framework revision d36e2f6191 (8 days ago), 2017-06-21 15:09:10 -0700
• Engine revision b0dee695ec
• Tools Dart version 1.24.0-dev.6.7
[✓] Android toolchain - develop for Android devices (Android SDK 22.0.1)
• Android SDK at /Users/fum/Library/Android/sdk
• Platform android-22, build-tools 22.0.1
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)
[-] iOS toolchain - develop for iOS devices (Xcode 8.3.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 8.3.2, Build version 8E2002
✗ libimobiledevice and ideviceinstaller are not installed or require updating. To update, run:
brew update
brew uninstall --ignore-dependencies libimobiledevice
brew install --HEAD libimobiledevice
brew install ideviceinstaller
✗ ios-deploy not installed. To install:
brew update
brew install ios-deploy
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS.
For more info, see https://flutter.io/platform-plugins
To install:
brew update
brew install cocoapods
pod setup
[✓] Android Studio (version 2.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Gradle version 3.2
• Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)
[✓] Connected devices
• None
必要なものを入れないと色々後で面倒なので、ここでインストールをお勧めします。
次は、IntelliJのインストールと設定と続きます。
コメント 0