flutter SDK installation설치

Dr.Green·2022년 10월 29일
0

다운로드

  1. SDK 다운로드
    https://docs.flutter.dev/get-started/install/macos
    intel 또는 arm64(m1-m2 chip)에 맞게 다운로드 한다.
  2. Git을 통한 다운로드
 git clone https://github.com/flutter/flutter.git -b stable

환경 설정

  1. flutter path
 export PATH="$PATH:`pwd`/flutter/bin"
 // 확인
 echo $path
 // 결과 
/Users/gujagwang/.rbenv/shims {}/.rbenv/bin /opt/homebrew/bin 
/opt/homebrew/sbin /usr/local/bin /usr/bin /bin 
/usr/sbin /sbin 
/Users/gujagwang/development/flutter/bin
  1. 터미널 환경 설정 파일 셋팅
  • 카탈리나 버전 이후로는 zshrc에 설정 등록한다. bash_profile아님.
  • 터미널에서 zshrc 파일을 열고
open ~/.zshrc
  • Path 추가하는 라인을 복붙해주고 파일을 저장해주세요
export PATH=$PATH:~/development/flutter/bin~/
  • 저장하고
source ~/.zshrc
// 확인
flutter --version
flutter doctor

설치 확인

  1. flutter doctor
[✓] Flutter (Channel stable, 3.3.6, on macOS 12.6 21G115 darwin-arm, locale ko-KR)
[!] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses
[✗] Xcode - develop for iOS and macOS
    ✗ 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
        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 see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] Android Studio (version 2020.3)
[✓] IntelliJ IDEA Ultimate Edition (version 2021.2.3)
[✓] VS Code (version 1.61.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

2.조치

  • andorid chain은 정상
  • andorid toolchain 설정이 필요 ->Some Android licenses not accepted
$ flutter doctor --android-licenses
6 of 7 SDK package licenses not accepted. 100% Computing updates...             
Review licenses that have not been accepted (y/N)? y
// 계속 y 를 입력한다.
// 다 읽고 y를 하면 영어 실력이 향상된다.
  • X-code는 설치 필요로 표시됨.

Android Studio

  1. Add plugins
    Flutter , Dart
  2. Andriod Studio 재시작하면 프로젝트 시작 타입에 flutter project가 보인다.
profile
모바일 퍼스트

0개의 댓글