아래 내용은 맥북 m1으로 설치한 과정입니다.
1. Flutter SDK 설치
https://docs.flutter.dev/get-started/install/macos
macOS install
How to install on macOS.
docs.flutter.dev
우선 위 사이트로 들어가서 오른쪽에 있는 버튼을 눌러서. zip 파일을 다운로드하였다.
이후 다운로드 완료를 누르니 자동으로 압축이 풀리고 다운로드 폴더 안으로 flutter 폴더가 들어가 있었다.
그래서 그 파일을 아래의 경로로 옮겨주었다.
export PATH="$PATH:/Users/개인설정마다 다름/flutterSDK/flutter/bin"
2. 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
이건 구글에 안드로이드 스튜디오 설치를 검색해서 ARM 어쩌고 적혀있는 걸 다운로드하였다.
- 설치가 완료되면 안드로이드 스튜디오를 시작하고 이후 아래처럼 진행하면 된다.
- Setup Wizard는 Next
- Standard 랑 Custom 설정은 Standart로 설정
- 테마는 검은색으로 하였다.
- 이후 잘 모르는 것들은 검색하거나 그냥 Next로 진행하였다.
3. Android Studio 설정
다른 에디터를 사용하더라도 안드로이드 스튜디오는 설정해 두고 사용해야 한다고 한다.
1. 안드로이드 스튜디오를 처음 키면 Plugins 메뉴로 가서 Flutter를 다운로드하여준다. dart가 설치되어 있지 않으면 설치를 할 것인지 물어보는데 설치를 해주어야 한다.
2. 다시 Project 메뉴로 돌아와서 More Action을 클릭하여 SDK Manager을 클릭해 준다. 이미 프로젝트가 있다면 상단에 점을 클릭하면 보인다.
3. SDK Tools 탭으로 들어가서 Android SDK Command-line tools 부분체크하고 적용 누르면 됩니다.
4. 환경 변수 등록
개인적으로 제일 오래 걸렸던 부분이다. 사람마다 다르니 잘 찾아보면서 진행해야 한다. 우선 내가 진행한 방법은 아래와 같다.
1. 터미널 창을 연다.
2. 아래 명령어를 입력해서. zshrc 파일을 확인한다.
vi ~/.zshrc
3. 앞서 다운로드한 flutter 폴더의 위치를 작성해 준다.
나는 flutterSDK 폴더를 만들어서 flutter폴더를 넣어줘서 아래와 같이 진행하였다.
export PATH="$PATH:/Users/개인설정마다 다름/flutterSDK/flutter/bin"
4. 이후 아래의 명령어를 통해서 제대로 설정되었는지 확인할 수 있다.
여기에 자세히 에러가 나와있으니 해결하면 좋을 것 같다.
flutter doctor
본인은 Cocoapods를 sudo로 설치를 하니 비밀번호를 치고 아무런 동작도 하지 않아서 brew로 설치하였다. 왜인지는 모르겠지만 혹시나 안된다면 해보는 것도 좋을 것 같다.
Reference
https://velog.io/@oen/flutter-doctor-%EC%97%90%EB%9F%AC
flutter doctor 실행시 각종 에러 해결
velog.io
https://guides.cocoapods.org/using/getting-started.html#installation
CocoaPods Guides
CocoaPods is fully open-sourced, so it depends on community contributions to get better. If you're looking to start working on CocoaPods, this is the place to start.
guides.cocoapods.org
https://mac-user-guide.tistory.com/173
[Pod error] sudo gem install cocoapods 실행 시 에러 (해결법 포함)
sudo gem install cocoapods 실행 시 에러 ERROR: Error installing cocoapods: ERROR: Failed to build gem native extensions sudo gem install cocoapods 시 ERROR log sudo gem install cocoapods Building native extensions. This could take a while... ERROR: E
mac-user-guide.tistory.com
https://www.whatwant.com/entry/Flutter-Install-MacOS
플러터 개발 환경 구축 (Flutter Install) - MacOS
M1 맥북을 경품으로 받았다. 할아버지 맥북(2011)밖에 없었는데, 나에게도 최신 맥북이 생겼다! 앗싸!! 그런데, 새로운 나의 맥북이 오자마자 생존의 위협을 받고 있다. Windows 노트북 2대, 맥북 2대,
www.whatwant.com
https://codingapple.com/unit/flutter-install-on-windows-and-mac/
Flutter 설치와 개발환경 셋팅 (윈도우 / 맥) - 코딩애플 온라인 강좌
Flutter 개발환경 셋팅하기 위해 설치할 것들이 좀 있습니다. 윈도우 10이상 (64bit) 또는 맥OS 10.14버전 이상이 필요합니다. 1. Flutter SDK 설치 https://flutter.dev/docs/development/tools/sdk/releases?tab=windows 위 사
codingapple.com