-
flutter 개발 도구 설치flutter 2021. 1. 31. 20:28
flutter 설치법은 공식 방법과 비공식 방법을 섞어서 아래처럼 하는데
xcode는 이미 설치 되어 있어서 생략 합니다.
oneboard@oneboarcBookPro ~ % git clone -b beta https://github.com/flutter/flutter.git 'flutter'에 복제합니다... remote: Enumerating objects: 289848, done. remote: Total 289848 (delta 0), reused 0 (delta 0), pack-reused 289848 오브젝트를 받는 중: 100% (289848/289848), 128.27 MiB | 14.19 MiB/s, 완료. 델타를 알아내는 중: 100% (224295/224295), 완료. Updating files: 100% (5185/5185), 완료. oneboard@oneboarcBookPro ~ % export PATH=$PWD/flutter/bin:$PATH oneboard@oneboarcBookPro ~ % flutter doctor Downloading Dart SDK from Flutter engine 7a8f8ca02c276dce02f8dd42a44e776ac03fa9bc... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 173M 100 173M 0 0 39.4M 0 0:00:04 0:00:04 --:--:-- 39.4M Building flutter tool... ╔════════════════════════════════════════════════════════════════════════════╗ ║ Welcome to Flutter! - https://flutter.dev ║ ║ ║ ║ The Flutter tool uses Google Analytics to anonymously report feature usage ║ ║ statistics and basic crash reports. This data is used to help improve ║ ║ Flutter tools over time. ║ ║ ║ ║ Flutter tool analytics are not sent on the very first run. To disable ║ ║ reporting, type 'flutter config --no-analytics'. To display the current ║ ║ setting, type 'flutter config'. If you opt out of analytics, an opt-out ║ ║ event will be sent, and then no further information will be sent by the ║ ║ Flutter tool. ║ ║ ║ ║ By downloading the Flutter SDK, you agree to the Google Terms of Service. ║ ║ Note: The Google Privacy Policy describes how data is handled in this ║ ║ service. ║ ║ ║ ║ Moreover, Flutter includes the Dart SDK, which may send usage metrics and ║ ║ crash reports to Google. ║ ║ ║ ║ Read about data we send with crash reports: ║ ║ https://flutter.dev/docs/reference/crash-reporting ║ ║ ║ ║ See Google's privacy policy: ║ ║ https://policies.google.com/privacy ║ ╚════════════════════════════════════════════════════════════════════════════╝ Downloading Material fonts... 504ms Downloading Gradle Wrapper... 20ms Downloading package sky_engine... 305ms Downloading flutter_patched_sdk tools... 1,867ms Downloading flutter_patched_sdk_product tools... 1,194ms Downloading darwin-x64 tools... 1,901ms Downloading libimobiledevice... 190ms Downloading usbmuxd... 188ms Downloading libplist... 185ms Downloading openssl... 251ms Downloading ios-deploy... 185ms Downloading darwin-x64/font-subset tools... 285ms Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel beta, 1.25.0-8.3.pre, on macOS 11.1 20C69 darwin-x64, locale ko-KR) [!] Android toolchain - develop for Android devices (Android SDK version 30.0.3) ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses [✓] Xcode - develop for iOS and macOS [✓] Android Studio (version 4.1) [✓] VS Code (version 1.52.1) [!] Connected device ! No devices available ! Doctor found issues in 2 categories.
지금시점에서 xcode와 android studio를 설치해야 하는데, ionic capacitor 설치를 참조하면 됩니다.
mac에서 아래와 같이 개발용 시뮬레이터를 런칭할 수 있습니다.
open -a Simulator
android를 위해서 License를 체크하는 과정을 거치는데, 많은 것을 물어보면 그냥 y를 누르면 됩니다.
oneboard@oneboarcBookPro ~ % flutter doctor --android-licenses
이제 flutter를 한번 더 실행해서 뭐가 문제인지 체크해 보면, 이슈는 전혀 없습니다.
oneboard@oneboarcBookPro ~ % flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel beta, 1.25.0-8.3.pre, on macOS 11.1 20C69 darwin-x64, locale ko-KR) [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) [✓] Xcode - develop for iOS and macOS [✓] Android Studio (version 4.1) [✓] VS Code (version 1.52.1) [✓] Connected device (1 available) • No issues found!
shell에 경로설정이 되어 있지 않으면, 매번 경고를 잡아야 하므로
vi ~/.zshrc 명령으로 .zshrc 파일을 수정해서 경로를 바르게 지정을 하도록 수정하고
터미널을 종료후에 다시 시작 합니다.
oneboard@oneboarcBookPro ~ % more ~/.zshrc export PATH="$PATH:$HOME/.composer/vendor/bin:$HOME/flutter/bin"
경로는 다음처럼 확인이 됩니다.
oneboard@oneboarcBookPro ~ % echo $PATH /Users/oneboard/flutter/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/oneboard/.composer/vendor/bin:/Users/oneboard/Dev/SDKs/flutter/bin:/Users/oneboard/.composer/vendor/bin:/Users/oneboard/flutter/bin
구글을 검색하면, 여러가지 버젼의 설치가 있는데 각각의 문서가 달라서 고생을 했습니다. ㅠㅠ
반응형'flutter' 카테고리의 다른 글
flutter 상태관리 - getX (0) 2021.05.22 flutter 버젼 업그레이드 하기 (1) 2021.02.11 mac + vs code로 flutter 개발하기 (0) 2021.01.31