facebook twitter hatena line email

「Flutter/インストール」の版間の差分

提供: 初心者エンジニアの簡易メモ
移動: 案内検索
(シンプルプロジェクトを作成)
(確認)
行15: 行15:
 
==確認==
 
==確認==
 
  flutter doctor
 
  flutter doctor
 +
 +
<pre>
 +
[✓] Flutter (Channel stable, v1.2.1, on Mac OS X 10.13.6 17G3025, locale ja-JP)
 +
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
 +
    ✗ Android license status unknown.
 +
[!] iOS toolchain - develop for iOS devices (Xcode 10.0)
 +
    ✗ libimobiledevice and ideviceinstaller are not installed. To install with Brew, run:
 +
        brew update
 +
        brew install --HEAD usbmuxd
 +
        brew link usbmuxd
 +
        brew install --HEAD libimobiledevice
 +
        brew install ideviceinstaller
 +
    ✗ ios-deploy not installed. To install:
 +
        brew install ios-deploy
 +
[✓] Android Studio (version 3.2)
 +
[✓] Connected device (1 available)
 +
</pre>
 +
 +
==Android license status unknown.が出た場合==
 +
  flutter doctor --android-licenses
  
 
==シンプルプロジェクトを作成==
 
==シンプルプロジェクトを作成==

2019年4月18日 (木) 13:17時点における版

ダウンロード

https://flutter.dev/docs/get-started/install/macos

設置

適当な場所(/d/src/)に設置して解凍

cd /d/src/
mv ~/Downloads/flutter_macos_v1.2.1-stable.zip ./
unzip flutter_macos_v1.2.1-stable.zip

パス追加

$ vi ~/.bash_profile
export PATH="$PATH:/d/src/flutter/bin"
$ source ~/.bash_profile

確認

flutter doctor
[✓] Flutter (Channel stable, v1.2.1, on Mac OS X 10.13.6 17G3025, locale ja-JP)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    ✗ Android license status unknown.
[!] iOS toolchain - develop for iOS devices (Xcode 10.0)
    ✗ libimobiledevice and ideviceinstaller are not installed. To install with Brew, run:
        brew update
        brew install --HEAD usbmuxd
        brew link usbmuxd
        brew install --HEAD libimobiledevice
        brew install ideviceinstaller
    ✗ ios-deploy not installed. To install:
        brew install ios-deploy
[✓] Android Studio (version 3.2)
[✓] Connected device (1 available)

Android license status unknown.が出た場合

 flutter doctor --android-licenses

シンプルプロジェクトを作成

flutter create my_app
cd my_app
flutter run

右下の+ボタンで数値がカウントアップしていくサンプルが立ち上がる

ホットリロード

flutter run

を実行した後、コマンドが待機状態になる、コード更新してコマンド側で"r"を押す。"R"だと再構築リロードされる

gitが使えればこちらでもDL&インストールできる

cd /d/src/
git clone -b master https://github.com/flutter/flutter.git
./flutter/bin/flutter --version