스파르타 코딩 클럽에서 앱 개발 강의를 듣는데
사전 설치 과정에서 명령 프롬프트 실행으로 버전 확인을 하라는 상황이었다.
명령 프롬프트에 flutter --version 이라고 검색했을 때, 아래와 같은 문구가 뜨면 설치 완료!
하지만
계속 이렇게 문구가 뜨는 것이다.
에서 입력하라는데로 환경변수 설정을 하고
명령프롬프트 실행전 우클릭 관리자 모드로 실행해서
겨우 겨우 버전을 확인 할 수가 있었다..
실행시에도 명령프롬프트 오른쪽버튼 눌러서 관리자 모드에서
C:\Windows\System32>flutter
입력을 하니
Manage your Flutter app development.
Common commands:
flutter create
Create a new Flutter project in the specified directory.
flutter run [options]
Run your Flutter application on an attached device or in an emulator.
Usage: flutter [arguments]
Global options:
-h, --help Print this usage information.
-v, --verbose Noisy logging, including all shell commands executed.
If used with "--help", shows hidden options. If used with "flutter doctor", shows additional
diagnostic information. (Use "-vv" to force verbose logging in those cases.)
-d, --device-id Target device id or name (prefixes allowed).
--version Reports the version of this tool.
--suppress-analytics Suppress analytics reporting for the current CLI invocation.
--disable-telemetry Disable telemetry reporting when this command runs.
Available commands:
Flutter SDK
bash-completion Output command line shell completion setup scripts.
channel List or switch Flutter channels.
config Configure Flutter settings.
doctor Show information about the installed tooling.
downgrade Downgrade Flutter to the last active version for the current channel.
precache Populate the Flutter tool's cache of binary artifacts.
upgrade Upgrade your copy of Flutter.
Project
analyze Analyze the project's Dart code.
assemble Assemble and build Flutter resources.
build Build an executable app or install bundle.
clean Delete the build/ and .dart_tool/ directories.
create Create a new Flutter project.
drive Run integration tests for the project on an attached device or emulator.
gen-l10n Generate localizations for the current project.
pub Commands for managing Flutter packages.
run Run your Flutter app on an attached device.
test Run Flutter unit tests for the current project.
Tools & Devices
attach Attach to a running app.
custom-devices List, reset, add and delete custom devices.
devices List all connected devices.
emulators List, launch and create emulators.
install Install a Flutter app on an attached device.
logs Show log output for running Flutter apps.
screenshot Take a screenshot from a connected device.
symbolize Symbolize a stack trace from an AOT-compiled Flutter app.
Run "flutter help " for more information about a command.
Run "flutter help -v" for verbose help output, including less commonly used options.
이런내용이 뜬다.
에? 갑자기이제 관리자에서 실행안해도 flutter doctor 실행이되네?
이 기세를 몰아서 flutter doctor --android-licenses 명령어도 입력해본다.
ㅋ 근데 또 오류..
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main"
어쩌고..
java 가 뭐 잘못됐단다.
오류 검색을 하다보니...
이게 생각나서 보니 버전을 8.0으로 하라는 것.?
나는 9.0에 체크가 되어있었다...
설치중..
C:\Users\사용자명\AppData\Local\Android\Sdk\cmdline-tools
들어가서 8.0이라고 되어있는 폴더명을 latest로 변경
오마이갓
갑자기 왜 잘되는거죠?
C:\Users\사용자이름\AppData\Local\Android\Sdk
C:\Windows\System32\flutter
C:\src\flutter\bin\mingit\cmd (시스템 환경변수 설정)
이것 저것 다 때려 넣어봄....
대체 뭐가 문제일까 계속 flutter doctor 명령어에서
첫번째 sdk 경로가 ! 로 뜬다.
C:\src\flutter\bin\
만남겨놓고
하나씩 삭제하는데 또 갑자기 flutter doctor 명령어가 안듣네.
뭐냐 시스템 환경변수에 C:\src\flutter\bin\ 를 추가로 넣었을때 실행이 또 되네?
아.. 이거 뭐 아이큐 테스트하나 ..머리진짜겁나써야함.
거의 하루를 다 소비하고서 오류를 찾았다..
와.에베레스트 등산한 기분..
시스템 속성 - 고급 - 환경변수 에서
해결 방법은 위쪽에 사용자 변수는 따로 변수 입력 안하고 건들지 않았고
아래쪽 시스템 변수쪽에 Path 편집으로 들어가서
C:\src\flutter\bin\ 를 맨 위로 끌어 올려줘서 제일먼저 실행되게끔 해줬더니.. 문제가 해결이됐다.....
뭔가 중간에 선순위 실행파일이 있어서 엉켰던 것 같다..
하... 드디어 이제 앱개발 수업을 할 수 있게 된것같다...
험난하네 시작부터 ㅋㅋㅋㅋㅋㅋㅋ