๋ฐ˜์‘ํ˜•

Android Studio


โถ Android Studio ์„ค์น˜ (JetBrains ToolBox๋กœ๋„ ์„ค์น˜ ๊ฐ€๋Šฅ)

brew install android-studio

 

โท Android Studio ์‹คํ–‰ - Setup Wizard - Install Type์—์„œ Standard ์„ ํƒ ํ›„ ์„ค์น˜. Standard ์„ ํƒ ์‹œ ์•ˆ๋“œ๋กœ์ด๋“œ ๊ฐœ๋ฐœ์— ํ•„์š”ํ•œ SDK, ๋นŒ๋“œ ํˆด, ์—๋ฎฌ๋ ˆ์ดํ„ฐ๊ฐ€ ์ž๋™์œผ๋กœ ์„ค์น˜๋œ๋‹ค. Setup Wizard๋Š” Android Studio๋ฅผ ์ฒ˜์Œ ์‹คํ–‰ํ–ˆ์„ ๋•Œ ๋‚˜์˜จ๋‹ค.

Setup Wizard๋Š” Android Studio๋ฅผ ์ฒ˜์Œ ์‹คํ–‰ํ–ˆ์„ ๋•Œ ๋‚˜์˜จ๋‹ค

โธ Settings(โŒ˜ ,) - Android SDK ๋ฉ”๋‰ด - SDK Tools ํƒญ - Android SDK Command-line Tools ์ฒดํฌ.

์•ˆ๋“œ๋กœ์ด๋“œ๋„ ๊ฐœ๋ฐœํ•œ๋‹ค๋ฉด ์œ„ 5๊ฐœ ํ•ญ๋ชฉ์— ๋ชจ๋‘ ์ฒดํฌํ•ด์„œ ์„ค์น˜ํ•œ๋‹ค

โน Flutter, Dart ํ”Œ๋Ÿฌ๊ทธ์ธ ์„ค์น˜

Flutter, Dart ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ๊ฐ๊ฐ ๊ฒ€์ƒ‰ํ•ด์„œ ์„ค์น˜ํ•œ๋‹ค

 

Flutter / Dart SDK


๐Ÿ’ก Flutter SDK๋ฅผ ์„ค์น˜ํ•˜๋ฉด Dart SDK๋„ ๊ฐ™์ด ์„ค์น˜๋œ๋‹ค.

brew install flutter

 

  • Flutter SDK ์„ค์น˜ ๊ฒฝ๋กœ : /opt/homebrew/Caskroom/flutter/<๋ฒ„์ „>/flutter
  • Dart SDK ์„ค์น˜ ๊ฒฝ๋กœ : <Flutter SDK ์„ค์น˜ ๊ฒฝ๋กœ>/bin/cache/dart-sdk
  • flutter doctor -v ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•˜๋ฉด Flutter SDK ์„ค์น˜ ๊ฒฝ๋กœ๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

 

 

๊ฐœ๋ฐœ ๊ตฌ์„ฑ


iOS

โถ CocoaPods ์„ค์น˜ (iOS ํ”„๋กœ์ ํŠธ ์˜์กด์„ฑ ๊ด€๋ฆฌ ๋„๊ตฌ)

brew install cocoapods

 

โท xCode ์„ค์น˜ (์•ฑ์Šคํ† ์–ด xCode ๊ฒ€์ƒ‰ ํ›„ ์ง์ ‘ ์„ค์น˜ํ•  ์ˆ˜๋„ ์žˆ๋‹ค)

# ๋งฅ ์•ฑ์Šคํ† ์–ด CLI ๋„๊ตฌ mas ์„ค์น˜
brew install mas

# mas๋ฅผ ์ด์šฉํ•ด์„œ xCode ์„ค์น˜
# 497... ์ˆซ์ž๋Š” ์•ฑ์Šคํ† ์–ด ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ID
mas install 497799835

 

โธ xCode ๋ช…๋ น์ค„ ๋„๊ตฌ(command-line tools) ๊ตฌ์„ฑ

sudo sh -c 'xcode-select -s /Applications/Xcode.app/Contents/Developer && xcodebuild -runFirstLaunch'

 

โน xCode ๋ผ์ด์„ ์Šค ๋™์˜

sudo xcodebuild -license

 

โบ (์„ค์น˜๋˜์–ด ์žˆ์ง€ ์•Š๋‹ค๋ฉด) iOS ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ ์„ค์น˜

xcodebuild -downloadPlatform iOS

 

โป (์• ํ”Œ ์‹ค๋ฆฌ์ฝ˜ ๋งฅ ์‚ฌ์šฉ์ž๊ฐ€ ์ธํ…” ๊ธฐ๋ฐ˜ ์•ฑ ๊ฐœ๋ฐœ ์‹œ) Rosetta 2 ์„ค์น˜

sudo softwareupdate --install-rosetta --agree-to-license

 

Android

์•ˆ๋“œ๋กœ์ด๋“œ ๊ฐœ๋ฐœ์—” ์•„๋ž˜ ์ปดํฌ๋„ŒํŠธ๊ฐ€ ํ•„์š”ํ•˜๋‹ค. ์•ˆ๋“œ๋กœ์ด๋“œ ์ŠคํŠœ๋””์˜ค๋ฅผ ์‹คํ–‰ํ•˜๊ณ  Setup Wizard์—์„œ Standard๋ฅผ ์„ ํƒํ–ˆ๋‹ค๋ฉด ์ž๋™์œผ๋กœ ์„ค์น˜๋œ๋‹ค.

 

  • Android SDK Platform, API
  • Android SDK Command-line Tools
  • Android SDK Build-Tools
  • Android SDK Platform-Tools
  • Android Emulator

 

๋งŒ์•ฝ ์„ค์น˜ํ•˜์ง€ ์•Š์€ ํ•ญ๋ชฉ์ด ์žˆ๋‹ค๋ฉด ์•ˆ๋“œ๋กœ์ด๋“œ ์ŠคํŠœ๋””์˜ค Settings(โŒ˜ ,) - Android SDK ๋ฉ”๋‰ด์—์„œ ํ•„์š”ํ•œ ํ•ญ๋ชฉ์„ ์ฒดํฌํ•œ ๋’ค ์ €์žฅํ•˜๋ฉด ์ž๋™์œผ๋กœ ์„ค์น˜๋œ๋‹ค.

SDK Platforms ํƒญ
SDK Tools ํƒญ

 

๊ธฐํƒ€ ์„ค์ •


โถ ์•ˆ๋“œ๋กœ์ด๋“œ ๋ผ์ด์„ ์Šค ๋™์˜

flutter doctor --android-licenses
# ์•ฝ๊ด€ ๋‚˜์˜ค๋ฉด y ์ž…๋ ฅํ•ด์„œ ๋™์˜(์—ฌ๋Ÿฌ๋ฒˆ ๋‚˜์˜ด)

 

โท Dart, Flutter ์• ๋„๋ฆฌํ‹ฑ์Šค ๋ฆฌํฌํŠธ(Telemetry) ๋น„ํ™œ์„ฑ

flutter --disable-analytics
dart --disable-analytics

 

โธ Flutter ๊ฐœ๋ฐœ ํ™˜๊ฒฝ ์„ค์ • ์ž˜๋๋Š”์ง€ ํ™•์ธ

flutter doctor

# Doctor summary (to see all details, run flutter doctor -v):
# [โœ“] Flutter (Channel stable, 3.24.1, on macOS 14.6.1 23G93 darwin-arm64, locale ko-KR)
# [โœ“] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
# [โœ“] Xcode - develop for iOS and macOS (Xcode 15.4)
# [โœ“] Chrome - develop for the web
# [โœ“] Android Studio (version 2024.1)
# [โœ“] VS Code (version 1.92.2)
# [โœ“] Connected device (3 available)
# [โœ“] Network resources

 

 

์—๋ฎฌ๋ ˆ์ดํ„ฐ ๊ธฐ๊ธฐ ์ถ”๊ฐ€


Android

โถ Android Studio ์‹คํ–‰ - ์šฐ์ธก ์ƒ๋‹จ ์„ธ๋กœ ... ๋ฒ„ํŠผ ํด๋ฆญ - Virtual Device Manager ํด๋ฆญ

 

โท ์ขŒ์ธก ์ƒ๋‹จ + Create Virtual Device ๋ฒ„ํŠผ ํด๋ฆญ. (๊ธฐ์กด ์ถ”๊ฐ€ํ•œ ๊ธฐ๊ธฐ์˜ โ–ถ๏ธŽ ๋ฒ„ํŠผ์„ ํด๋ฆญํ•˜๋ฉด AVD๊ฐ€ ์‹œ์ž‘๋œ๋‹ค)

 

โธ ํ•˜๋“œ์›จ์–ด ์„ ํƒ - ์‹œ์Šคํ…œ ์ด๋ฏธ์ง€ ์„ ํƒ - AVD name ์ง€์ •ํ›„ ์ƒ์„ฑ

AVD name ์ง€์ • ํ™”๋ฉด

โน ๋นŒ๋“œ ๋ฐ ์‹คํ–‰

Android Studio ์šฐ์ธก ๋ฉ”๋‰ด๋ฐ” - Device Manager ํด๋ฆญ - โ–ถ๏ธŽ ๋ฒ„ํŠผ ํด๋ฆญ - (AVD ์‹คํ–‰) - Run main.dart ๋ฒ„ํŠผ์„ ํด๋ฆญํ•˜๋ฉด IDE ์šฐ์ธก์— ๊ธฐ๊ธฐ ๋ฏธ๋ฆฌ ๋ณด๊ธฐ๊ฐ€ ํ‘œ์‹œ๋œ๋‹ค. Flutter์˜ ๋ชจ๋ฐ”์ผ ๊ฐœ๋ฐœ์€ Hot Reload๋ฅผ ์ง€์›ํ•˜๋ฏ€๋กœ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ๋ฐ”๋กœ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

 

โบ CLI ๋ช…๋ น์–ด

# ์ถ”๊ฐ€ํ•œ AVD ๋ฆฌ์ŠคํŠธ ํ™•์ธ
~/Library/Android/sdk/emulator/emulator -list-avds

# ์ž…๋ ฅํ•œ AVD Name ์‹คํ–‰
~/Library/Android/sdk/emulator/emulator -avd <avd-name>

 

emulator ๊ฒฝ๋กœ๋ฅผ ๋ชจ๋‘ ์ž…๋ ฅํ•˜๊ธฐ ๋ฒˆ๊ฑฐ๋กœ์šฐ๋ฉด ์•„๋ž˜ Path๋ฅผ ~/.zshrc ํŒŒ์ผ์— ์ถ”๊ฐ€ํ•œ๋‹ค.

export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator

# ์ถ”๊ฐ€ ํ›„ ์•„๋ž˜ ๋ช…๋ น์–ด๋กœ ์‹คํ–‰ ๊ฐ€๋Šฅ
emulator -list-avds
emulator -avd <avd-name>

 

iOS

โถ Simulator.app ์•ฑ์„ ์‹คํ–‰ํ•˜๋ฉด ์ด์ „์— ์„ ํƒํ–ˆ๋˜ ๊ธฐ๊ธฐ๋กœ ์ž๋™ ์‹คํ–‰๋œ๋‹ค. ๊ธฐ๊ธฐ๋ฅผ ๋ณ€๊ฒฝํ•˜๊ณ  ์‹ถ์œผ๋ฉด ์™ผ์ชฝ ์ƒ๋‹จ ๋ฉ”๋‰ด๋ฐ” File - Open Simulator ํด๋ฆญ ํ›„ ์›ํ•˜๋Š” ๊ธฐ๊ธฐ๋ฅผ ์„ ํƒํ•œ๋‹ค.

 

โท iOS ๋ฒ„์ „์„ ๋ฐ”๊พธ๊ณ  ์‹ถ์œผ๋ฉด xCode ์‹คํ–‰ - Preference(โŒ˜ ,) - Platforms ํƒญ - ์ขŒ์ธก ํ•˜๋‹จ + ๋ฒ„ํŠผ ํด๋ฆญ - iOS ์„ ํƒ ํ›„ ์›ํ•˜๋Š” ๋ฒ„์ „์„ ์„ค์น˜ํ•  ์ˆ˜ ์žˆ๋‹ค.

 

โธ ๋นŒ๋“œ ๋ฐ ์‹คํ–‰

Android Studio ์šฐ์ธก ์ƒ๋‹จ ๊ธฐ๊ธฐ ์„ ํƒ ๋ฒ„ํŠผ - Open iOS Simulator ํด๋ฆญ - (iOS ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ ์‹คํ–‰) - Run main.dart ๋ฒ„ํŠผ์„ ํด๋ฆญํ•˜๋ฉด iOS ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ์—์„œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์ด ๋นŒ๋“œ๋˜๊ณ  ์‹คํ–‰๋œ๋‹ค. ์ฝ”๋“œ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์€ ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ๋ฅผ ํ†ตํ•ด์„œ ์ฆ‰์‹œ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

 

โน CLI ๋ช…๋ น์–ด

# ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ์— ์„ค์น˜๋œ ๋ชจ๋“  ๊ธฐ๊ธฐ ๋ฆฌ์ŠคํŠธ ํ™•์ธ
xcrun simctl list devices

# ํŠน์ • ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ ์‹คํ–‰
xcrun simctl boot <device-udid>

# ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ ์•ฑ ์‹คํ–‰
open -a Simulator

# ์‹คํ–‰์ค‘์ธ ๋ชจ๋“  ์‹œ๋ฎฌ๋ ˆ์ดํ„ฐ ์ข…๋ฃŒ
xcrun simctl shutdown all

 

 

DartPad


DartPad ์‚ฌ์ดํŠธ์—์„œ ์ง์ ‘ ํ”Œ๋Ÿฌํ„ฐ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜๊ณ  ์‹คํ–‰ํ•ด ๋ณผ ์ˆ˜ ์žˆ๋‹ค. ์ƒ๋‹จ Samples ๋ฉ”๋‰ด๋ฅผ ํด๋ฆญํ•œ ๋’ค ๋ฏธ๋ฆฌ ์ •์˜๋˜์–ด ์žˆ๋Š” ํ”Œ๋Ÿฌํ„ฐ ํ…œํ”Œ๋ฆฟ์„ ์„ ํƒํ•  ์ˆ˜ ์žˆ๋‹ค.

 


๊ธ€ ์ˆ˜์ •์‚ฌํ•ญ์€ ๋…ธ์…˜ ํŽ˜์ด์ง€์— ๊ฐ€์žฅ ๋น ๋ฅด๊ฒŒ ๋ฐ˜์˜๋ฉ๋‹ˆ๋‹ค. ๋งํฌ๋ฅผ ์ฐธ๊ณ ํ•ด ์ฃผ์„ธ์š”
๋ฐ˜์‘ํ˜•