環境情報
Flutter:1.0.0
SDKのダウンロード
Flutter公式サイトからSDKをダウンロードできます。
flutter doctorの実行結果
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.0.0, on Mac OS X 10.14.2 18C54, locale ja-JP)
[!] Android toolchain - develop for Android devices (Android SDK 28.0.3)
! Some Android licenses not accepted. To resolve this, run: flutter doctor
--android-licenses
[✗] iOS toolchain - develop for iOS devices
✗ Xcode installation is incomplete; a full installation is necessary for iOS
development.
Download at: https://developer.apple.com/xcode/download/
Or install Xcode via the App Store.
Once installed, run:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
✗ 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 with Brew:
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 install cocoapods
pod setup
[✓] Android Studio (version 3.3)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] Android Studio (version 3.1)
✗ 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 3 categories.
[!] Android toolchain - develop for Android devices (Android SDK 28.0.3)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
と書いてあるのでflutter doctor --android-licenses
を実行。
出てくる質問に全てy
で回答すれば完了。
[✗] iOS toolchain - develop for iOS devices
✗ Xcode installation is incomplete; a full installation is necessary for iOS
Download at: https://developer.apple.com/xcode/download/
Or install Xcode via the App Store.
と記載されているので今回はApp Storeからダウンロード。
Once installed, run: sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
と記載されているのでsudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
を実行。
ここで再度flutter doctor
を実行、下記エラーが発生。
Error executing simctl: 69
Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo
xcodebuild -license” and then retry this command.
Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo
と記載されているので
xcodebuild -license” and then retry this command.sudo
を実行。
xcodebuild -license
ライセンス内容を読み終えた際に表示される質問にagree
と入力。
ここで再度flutter doctor
を実行、xcodebuildからソフトウェアインストールを促されるためインストール。(ある程度の待ち時間あり。)
インストールが完了しflutter doctorの実行結果が表示されれば完了。
✗ libimobiledevice and ideviceinstaller are not installed.
記載されている下記コマンドを上から順に実行。
brew update
brew install --HEAD usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice
brew install ideviceinstaller
-
brew update
を実行、特に問題なし。 -
brew install --HEAD usbmuxd
を実行、インストール済みという警告が表示される。 -
brew link usbmuxd
を実行、リンク済みという警告が表示される。 -
brew install --HEAD libimobiledevice
を実行、インストール済みという警告が表示される。 -
brew install ideviceinstaller
を実行、インストール済みという警告が表示される。
完了。
✗ ios-deploy not installed.
To install with Brew: brew install ios-deploy
と記載されているためbrew install ios-deploy
を実行で完了。
✗ CocoaPods not installed.
記載されている下記コマンドを上から順に実行。
brew install cocoapods
pod setup
-
brew install cocoapods
を実行、特に問題なし。 -
pod setup
を実行、Setup completedと表示される。
[✓] Android Studio (version 3.3)
※[✓] Android Studio (version 3.1)も同様です。
✗ Flutter plugin not installed; this adds Flutter specific functionality.
※✗ Dart plugin not installed; this adds Dart specific functionality.もこの項目で解消されます。
Android Studio起動→ToolbarのAndroid Studioクリック→Preferences→Plugins→Browse repositories→flutterで検索&インストール
これでFlutterとDartのプラグインがインストールされます。
[!] Connected device
端末をPCに接続した状態でflutter doctor
を実行すれば完了。