728x90
반응형

 


환경 : 맥북
순서
1. flutter 공홈 접속, 설치파일 다운로드, 설치 및 환경 변수 설정, flutter dockter 수행(환경 점검)
2. iOS, Android 개발환경 구축
- iOS의 경우 Xcode 를 apple store에서 다운받고
- Android의 경우 Android studio 받으면 됨

https://flutter-ko.dev/get-started/install/macos

(플러터 공홈) 접속 후 순서 따라서 설치

 

## 중요

flutter config 설정 초기화 방법은 ""를 해주면된다.

ex) flutter config --android-studio-dir "" // 안드로이드스튜디오 경로 설정해준거 초기화


iOS 관련 설정 정리

에러메시지#1

Xcode installation is incomplete; a full installation is necessary for iOS and macOS development.

app store에서 설치 직후, 터미널에서 하기 명령어 실행
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch

에러메시지#2

CocoaPods not installed.

하기 가이드 따라서 설치

https://guides.cocoapods.org/using/getting-started.html#installation

https://2vup.com/mac-cocoapods-install-error/

 


Android studio 관련 설정 정리

export ANDROID_PATH=/Users/{유저이름}/Library/Android
export PATH=$PATH:$ANDROID_PATH/sdk/platform-tools
이후 adb 터미널 실행 시, 되면 환경설정 잘 된거다.

해당 방법을 선행해주고 flutter doctor을 하자

아래 명령어로 설정해주면 설정이 꼬인다.
flutter config --android-sdk ##SDK 기본 경로는 /Users/{유저이름}/Library/Android/SDK
flutter config --android-studio-dir ##안드로이드 스튜디오 맥북 설치 기본 경로는 /Users/{유저이름}/Library/Android

flutter 에러#1

cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.

 

flutter 에러#2

Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

 

해당 에러는 flutter doctor --android-licenses로 해결해주는데

아래와 같이 디폴트 답변이 N라서 헷갈리지만, y로 라이센스 약관을 동의해주면된다.

 


 

 

 

 

728x90
반응형

+ Recent posts