AR삽질러

Dart - 설치 및 환경설정(1) 본문

Dart

Dart - 설치 및 환경설정(1)

아랑팡팡 2023. 8. 22. 15:21
728x90

우선 VSCode에서 Dart를 설치하고 실행하려고 하는데 당연하게도 SDK가 없어서 실행되지 않는다.

Dart를 설치하려고 했지만 어차피 Flutter때문에 배워보는것이기 때문에 Flutter SDK를 설치해보기로..

 

개발환경

IDE : Visual Studio Code

Programing Language : Dart

Framework : Flutter

 

1. 개발환경 설치 진행순서

IDE설치 : Visusal Studio Code

Flutter설치

git설치

VSCode에서 flutter, dart설치

Android Studio설치

 

1) VSCode설치

https://code.visualstudio.com/download

 

Download Visual Studio Code - Mac, Linux, Windows

Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows. Download Visual Studio Code to experience a redefined code editor, optimized for building and debugging modern web and cloud applications.

code.visualstudio.com

VSCode를 설치하는것은 어렵지않습니다.

 

2) Flutter설치

 2 -1) SDK.zip 다운으로 설치하는 방법

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

 

Windows install

How to install on Windows.

docs.flutter.dev

Flutter를 설치하시고 꼭 경로를 flutter안의 bin까지의 경로를 복사하신뒤 시스템속성 -> 환경변수 -> path경로에 등록해주세요!!!

 

3) git설치

 2 - 2) git clone에서 설치하는 방법

git clone https://github.com/flutter/flutter.git -b stable

 

사람마다 방법이 다르지만 저는 git이 편해 git으로 설치했습니다.

flutter설치후 Flutter실행검사

flutter doctor

 

Dart설치

https://dart.dev/get-dart

 

Get the Dart SDK

Get the libraries and command-line tools that you need to develop Dart web, command-line, and server apps.

dart.dev

 

3-1) Chocolatey로 설치하는 방법

 

git설치는 다운받고 next만 눌러주면 끝!

https://chocolatey.org/

 

Chocolatey - The package manager for Windows

Chocolatey is software management automation for Windows that wraps installers, executables, zips, and scripts into compiled packages. Chocolatey integrates w/SCCM, Puppet, Chef, etc. Chocolatey is trusted by businesses to manage software deployments.

chocolatey.org

 

3-2) 설치 마법사로 설치하는 방법

https://git-scm.com/downloads

 

Git - Downloads

Downloads macOS Windows Linux/Unix Older releases are available and the Git source repository is on GitHub. GUI Clients Git comes with built-in GUI tools (git-gui, gitk), but there are several third-party tools for users looking for a platform-specific exp

git-scm.com

 

Windows Powershell 관리자 권한으로 실행후 명령어 입력

Set-ExecutionPolicy Bypass -Scope Process -Force; 
[System.Net.ServicePointManager]::SecurityProtocol = 
[System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object 
System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

 

명령어를 입력하면 자동으로 설치가 되고

gitbash를 관리자 권한으로 실행후 아래의 명령을 입력한다.

 

choco install dart-sdk

 

뭐물어보면 Y

 

Android Studio설치

https://developer.android.com/studio

 

Download Android Studio & App Tools - Android Developers

Android Studio provides app builders with an integrated development environment (IDE) optimized for Android apps. Download Android Studio today.

developer.android.com

 

마지막으로 안드로이드 스튜디오 설치!

안드로이드스튜디오는 사용하지 않지만 UI디자인 기능이나 시각화를 확인할 수 있어 효율적으로 개발할 수 있을겁니다!

 

거의 다왔다ㅠㅠ

안드로이드 스튜디오 SDK를 설치해준뒤

Virtual Devices를 만들어준다!

실행시켜보니 문제없이 잘되는것 같다

이제 다시 git bash에서 제대로 동작하는지 확인

응? 넌누구니..

오랜만에 설치랑 환경설정때문에 애먹으니 옛날생각나네...ㅋㅋㅋㅋㅋ

Android Studio의 SDK Command-line을 설치해줘야한다.

여기까지 완료했다면

다시 git bash로 가서 flutter doctor --android-licenses를 입력해준다. -> Y

완료

 

2. Flutter Workspaces 만들기

 1) C드라이브에서 원하는 곳에 작업공간 workspace를 만들어주고 gitbash를 실행시켜준다.

 2) flutter create "프로젝트명" == 프로젝트 생성

 3) cd "프로젝트명" == 이동

 4) code .  == VSCode열기

여기까지 완료가 되었다면 개발준비끝!

 

3. 프로젝트 생성 및 테스트

 우선 Flutter로 앱을 만들기 전에 Dart를 공부하기로 한다..

이제 VSCode에서 Hello world!!가 잘나온다.

 

Dart, Flutter, VSCode, Android Studio, git 설치 및 환경설정 끝...

728x90
반응형
LIST

'Dart' 카테고리의 다른 글

Dart Typedef - (5)  (0) 2023.09.02
Dart Functions - (4)  (0) 2023.09.02
Dart DataTypes - (3)  (2) 2023.08.28
Dart Variables- (2)  (0) 2023.08.26
Dart 입문(0)  (0) 2023.08.21