티스토리 뷰

Flutter

2022-flutter 설치(작성중)

바람사탕 2022. 3. 27. 18:56
반응형

주의 : 이 글은 본인이 한 내용 기록용이며, 중간에 문제점이 다수 있을 수 있으니, 참고만 하시기 바랍니다.

 

System requirements

To install and run Flutter, your development environment must meet these minimum requirements:

  • Operating Systems: Windows 7 SP1 or later (64-bit), x86-64 based.
  • Disk Space: 1.64 GB (does not include disk space for IDE/tools).  (현재 2.8G정도 이다)
  • Tools: Flutter depends on these tools being available in your environment.
    • Windows PowerShell 5.0 or newer (this is pre-installed with Windows 10)
    • Git for Windows 2.x, with the Use Git from the Windows Command Prompt option.
    • If Git for Windows is already installed, make sure you can run git commands from the command prompt or PowerShell.

Get the Flutter SDK

  1. Download the following installation bundle to get the latest stable release of the Flutter SDK:For other release channels, and older builds, see the SDK releases page.
  2. flutter_windows_2.10.3-stable.zip
  3. Extract the zip file and place the contained flutter in the desired installation location for the Flutter SDK (for example, C:\Users\<your-user-name>\Documents).

 Warning: Do not install Flutter in a directory like C:\Program Files\ that requires elevated privileges.

If you don’t want to install a fixed version of the installation bundle, you can skip steps 1 and 2. Instead, get the source code from the Flutter repo on GitHub, and change branches or tags as needed. For example:

content_copy
C:\src>git clone https://github.com/flutter/flutter.git -b stable

You are now ready to run Flutter commands in the Flutter Console.

 

 

 

 

압축풀면, 아래와 같다.

 

 

 

flutter_console.bat 을 실행하면, 현재 폴더 밑의 bin을 PATH에 등록하고, 

위와 같은 창이 나온다.

 

 

flutter를 사용할 준비가 되었는지 확인하기 위해, "flutter doctor" 명령을 실행하면

flutter 는 설치가 되었고,

안드로이드 툴체인은 설치가 안되어 있다.

크롬은 웹 개발시 필요

Visual Studio도 필요하다.

 

https://developer.android.com/studio/index.html

 

Download Android Studio and SDK tools  |  Android Developers

The official IDE for Android app developers.

developer.android.com

 

 

 

D:\Flutter>flutter upgrade
Flutter is already up to date on channel stable
Flutter 2.10.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 7e9793dee1 (3 weeks ago) • 2022-03-02 11:23:12 -0600
Engine • revision bd539267b4
Tools • Dart 2.16.1 • DevTools 2.9.2

 

 

 

 

flutter config --no-analytics

구글 애널리틱스

구글 애널리틱스(Google Analytics)는 현재 구글 마케팅 플랫폼 브랜드 내의 플랫폼으로서, 웹사이트 트래픽을 추적하고 보고하는 구글이 제공하는 웹 애널리틱스 서비스이다. 구글은 2005년 11월 Urchin을 인수한 이후 이 서비스를 런칭했다. 2019년 기준으로 구글 애널리틱스는 웹에서 가장 널리 사용되는 웹 애널리틱스 서비스이다. 구글 애널리틱스는 구글 애널리틱스 포 모바일 앱스(Google Analytics for Mobile Apps)라는 이름의 iOS, 안드로이드 앱을 제공한다. 구글 애널리틱스는 브라우저, 브라우저 확장 기능, 방화벽, 그리고 기타 수단을 통해 차단이 가능하다.

 

 

안드로이드 스튜디오 설치해도 인식을 못한다....

안드로이드 스튜디오 실행해서 Install the Flutter and Dart plugins

파일->셋팅->플러그인

"Fl"검색하면 나옴

비슷한건 모두 설치 후 다시 실행.

Fluter Storm 제거

Dart 설치된것 확인

 

 

안드로이드 스튜디오에서 새로운 Fluter 프로젝트 생성

 

Kotlin : 자바 대신 만든 언어, 구글. 자바보다 좋다고 함.

 

안드로이드 툴체인 경로명 인식을 못하고 있음...

D:\Flutter>flutter config --android-sdk "C:\Program Files\Android\Android Studio"
Setting "android-sdk" value to "C:\Program Files\Android\Android Studio".

You may need to restart any open editors for them to read new settings.

D:\Flutter>

 

안드로이드 스튜디오(이하 "안스") 다시 실행.

이전 프로젝트나 나옴.

안스 Update 항목 실행.

안스 다시 실행.

 

디바이스 선택이 안된다....

 

가상 디바이스 만들어서 실행해도 바로 종료된다....

Intel x86 Emulator 추가 설치

Unable to install Intel® HAXM
HAXM can only be installed on Windows or Mac.
Please file a bug against Android Studio.

 

노트북이 AMD cpu......

노트북 재부팅...

재부팅할때,

바이오스에서 다른 설정을 하기 위해 Advanced Mode
CPU Configuration
SVM Mode=Enabled

그런데, SVM Mode 안보임...

 

그래도 실행 안됨....

 

 

Show Package Details 체크, ARM xxx 체크

 

cmdline-tools component is missing

 

Android license status unknown

flutter doctor --android-licenses

입력하고, y 몇번 눌러주면 됨.

(라이센스 확인하라는 것인듯)

 

 

안드로이드 설치가 안되었다는 메세지가 계속 나오는 경우, 아래와 같이 경로명 추가해서 인식이 되었다.

flutter config --android-sdk="C:\Users\i\AppData\Local\Android\Sdk"

 

 

 

이제 Visual Studio 만 설치하면 될듯 싶다.(안드로이드 에뮬레이터는 여전히 동작 안되고 있음)

 

 

 

the emulator process for avd has terminated

에뮬레이터 경로명에 한글이 있는 경우 : 영어로 변경해도 안됨.

 

환경변수 넣어도 안됨.

ANDROID_AVD_HOME
ANDROID_SDK_HOME
ANDROID_SDK_ROOT
ANDROID_HOME

 

 

안드로이드 스튜디어 삭제. 관련 폴더 모두 삭제.

 

윈도우10 사용자폴더에 사용자 이름이 한글로 되어 있음.

사용자 이름 바꾸어도, 한글 폴더명은 안바뀜.

 

Admin으로 로그인하여, 영어로된 새 사용자 추가, 안드로이드 스튜디오 다시 설치하여 성공.

결론 : 윈도우 한글 사용자명 때문에 안드로이드 가상머신(핸드폰) 실행이 안되었음.

 

 

 

 

flutter 프로젝트는

- flutter sdk폴더 안에 생성하면 안된다.

- 숫자로만 구성하면 안된다.

 

 

 

 

안드로이드 스튜디오에서 새로운 flutter 프로젝트 생성

​우측에 핸드폰 에뮬레이터가 켜져야, 에뮬레이터를 선택할 수 있게된다.

.

 

 

 

안드로이드 스튜디오 Gradle, AGP등 업그레이드중....

 

 

프로젝트 로딩후, android [untitled2_android] 항목 마우스 우클릭, flutter -> Open android module ... 하면, 새창에서 안드로이드만 실행할 수 있다.

(flutter 코드로   안드로이드용 자바코드 생성하여,   안드로이드 스튜디오에서 동작확인하는듯)

 

 

 

 

안드로이드 실행을 새창에서 열어서, 창이 2개가 됐다.

왼쪽은 flutter 코드, 오른쪽은 안드로이드.

 

 

현재 상태

 

 

윈도우에서 안드로이드 개발은 가능하지만, IOS(애플) 앱은 메일이나 기타 경로로 맥북(맥PC)로 보내서, xcode로 빌드해야한다.

(애플 IOS앱은 윈도우에서 빌드가 안된다.)

(Flutter는 안드로이드와 xcode로 빌드할 수 있는 코드를 생성하는 역할인듯)

반응형
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
more
«   2025/02   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28
글 보관함