【Flutter】 Mac開発環境

Mac flutter環境 install

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

$mkdir development

$ cd ~/.development

$ unzip ~/.Downloads/flutter_macos_1.22.5-stable.zip

解凍されたflutterのファイルフォルダをdevelopmentのフォルダに

移動させる。developnentのフォルダの中を確認のこと。

ファインダーを開いてdevelopmentの中にflutterのフォルダがあるか確認してください。

$ vim ~/.bash_profile

‘I’のキーを押して挿入モードにする。

$export PATH="$PATH :’pwd’ /flutter/bin”

ESCキーをおし挿入モードを抜ける。

:wqと打ち込み保存終了する。

$ echo $PATH と確認。

$ flutter  doctorと入力。

7wzero:development 7wzero$ flutter doctor

You have not agreed to the Xcode license agreements, please run ‘sudo xcodebuild -license’ from within a Terminal window to review and agree to the Xcode license agreements.

Downloading Material fonts…                                       0.4s

Downloading Gradle Wrapper…                                       0.0s

Downloading package sky_engine…                                   0.2s

Downloading flutter_patched_sdk tools…                            0.6s

Downloading flutter_patched_sdk_product tools…                    0.5s

Downloading darwin-x64 tools…                                     0.9s

Downloading libimobiledevice…                                     0.0s

Downloading usbmuxd…                                              0.0s

Downloading libplist…                                             0.0s

Downloading openssl…                                              0.1s

Downloading ios-deploy…                                           0.0s

Downloading darwin-x64/font-subset tools…                         0.2s

Downloading android-arm-profile/darwin-x64 tools…                 0.1s

Downloading android-arm-release/darwin-x64 tools…                 0.1s

Downloading android-arm64-profile/darwin-x64 tools…               0.1s

Downloading android-arm64-release/darwin-x64 tools…               0.1s

Downloading android-x64-profile/darwin-x64 tools…                 0.1s

Downloading android-x64-release/darwin-x64 tools…                 0.1s

Doctor summary (to see all details, run flutter doctor -v):

Failed to find the latest git commit date: VersionCheckError: Command exited

with code 69: git -c log.showSignature=false log -n 1 –pretty=format:%ad

–date=iso

Standard out: 

Standard error: 

You have not agreed to the Xcode license agreements, please run ‘sudo xcodebuild

-license’ from within a Terminal window to review and agree to the Xcode license

agreements.

Returning 1970-01-01 09:00:00.000 instead.

[✓] Flutter (Channel unknown, 0.0.0-unknown, on Mac OS X 10.15.7 19H15

    darwin-x64, locale ja-JP)

[✗] Android toolchain – develop for Android devices

    Unable to locate Android SDK.

      Install Android Studio from:

https://developer.android.com/studio/index.html

      On first launch it will assist you in installing the Android SDK

      components.

      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup

      for detailed instructions).

      If the Android SDK has been installed to a custom location, set

      ANDROID_SDK_ROOT to that location.

      You may also want to add it to your PATH environment variable.

[!] Xcode – develop for iOS and macOS (Xcode 12.3)

    Xcode end user license agreement not signed; open Xcode or run the command

      ‘sudo xcodebuild -license’.

    Xcode requires additional components to be installed in order to run.

      Launch Xcode and install additional required components when prompted or

      run:

        sudo xcodebuild -runFirstLaunch

    CocoaPods not installed.

        CocoaPods is used to retrieve the iOS and macOS platform side’s plugin

        code that responds to your plugin usage on the Dart side.

        Without CocoaPods, plugins will not work on iOS or macOS.

        For more info, see https://flutter.dev/platform-plugins

      To install:

        sudo gem install cocoapods

[!] Android Studio (version 4.0)

    Flutter plugin not installed; this adds Flutter specific functionality.

    Dart plugin not installed; this adds Dart specific functionality.

  注意:flutter doctorでplugin not installedと表示されますが、これはAndroidStudio4.0のバグです。このままで正常にコンパイルされます。

$ flutter –version

Follow me!

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です