반응형
우분투에서 VS Code를 이용해서 안드로이드용 플러터 앱을 개발하는 환경 설정 가이드
1. Flutter 설치
아래 링크에 가면 친절한 설치가이드를 확인 할 수 있지만,
리눅스 설치
flutter-ko.dev
요약하면 아래 세 단계로 설치가 가능하다.
1) 필수 패키지 설치
sudo apt install bash curl git unzip xz-utils libglu1-mesa
2) 다운로드, 압축 해제, PATH 설정
# Flutter 1.22.5 Stable 버전을 사용한다고 가정
cd ~
mkdir devtool
cd devtool
wget https://storage.googleapis.com/flutter_infra/releases/stable/linux/flutter_linux_1.22.5-stable.tar.xz
tar xvf flutter_linux_1.22.5-stable.tar.xz
echo "export PATH=\$PATH:`pwd`/flutter/bin" >> ~/.bashrc
source ~/.bashrc
3) 안드로이드 스튜디오 연결
# 안드로이드 스튜디오를 ~/devtool/ 아래에 풀어두었다고 가정.
flutter config --android-studio-dir=~/devtool/android-studio"
2. VS Code 설치
1) VS Code 역시 아래 링크를 방문하면 쉽게 설치 가능하다.
Visual Studio Code - Code Editing. Redefined
Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications. Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows.
code.visualstudio.com
2) VS Code 실행 후, flutter 플러그인도 설치해 보자.
3. 환경 검증
flutter doctor를 실행하면 현재 환경에 대한 정보가 나온다. Flutter, Android toolchain, VS Code 만 녹색 체크로 정상이라고 표시되면 모든 준비가 끝난 상황이다. 이제 개발을 시작....
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.5, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[!] Android Studio
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.52.0)
[!] Connected device
! No devices available
반응형
댓글