Flutter가 처음이라 깃허브에서 프로젝트 클론받으면, 아마 오류가 쌓여있을 것 같았다.
역시나도 Virtual Device에 Run 하니 오류가 뿜어져나왔다.
오류 고치기
영광스러운 첫 오류는.
패키지 문제
https://cishome.tistory.com/147
[flutter] Target of URI doesn't exist 'package:flutter/material.dart'
예전에 윈도우에서 작업하던 플러터 프로젝트를 맥환경에서 불러오니까 아래와 같은 에러가 나타났습니다. Target of URI doesn't exist 'package:flutter/material.dart' 패키지가 존재하지 않는다고 해서 sdk..
cishome.tistory.com
Shift 두 번 누르면, 검색 창이 뜬다.
pubspec.yaml 파일 검색한 뒤에, Pub get으로 패키지를 다시 다운받는다.
Device Manager 오픈이 안되는 문제
패키지 문제를 고치고, Device Manager를 클릭했는데, 아무 변화가 없었다.
https://stackoverflow.com/questions/70864465/why-device-manager-dont-open/70866555
Why Device Manager don't open?
I'm working on the Flutter project. After I updated the version of the Android Studio when I click on the device manager to open my devices it doesn't show. I don't know what should I do? At the fi...
stackoverflow.com
Shift 두번 눌러서 검색창 띄운 후, Virtual Device Manager를 검색하면 창이 뜬다.
build.gradle 문제
Properties, GradleException 등 빨간 줄이 떴다.
이건 예상한 대로 SDK 버전 문제였다.
https://ilsognobella.tistory.com/29
Flutter 프로젝트에서 app build.gradle의 Properties가 Cannot Resolve Symbol 일 때
언제부턴가 Flutter 프로젝트를 생성하면 android > app > build.gradle 파일에서 에러가 나타난다. 에러 메시지는 Cannot resolve symbol 'Properties'이다. GradleException에도 마찬가지 메시지가 나타난다. g..
ilsognobella.tistory.com
나는 자동으로 API Level 32가 깔렸는데, 프로젝트는 API Level이 31이라서 생긴 문제였다.
build.gradle에서 TargetSDK를 확인하고,
File -> Settings -> Appearance & Behavior -> System Settings -> Android SDK에서 다운 받아주면 된다.
다운받았으니, 설정해준다.
SDK가 네이밍을 달아서 프리셋을 설정해두는 것 같다.
프리셋을 32에서 31로 교체한 후, SDK를 이 프리셋으로 설정해주었다.
Properties 부분이 계속 빨간색이라면, Tools -> Flutter -> Clean 이후 Pub Upgrade 눌러주면 된다.
나도 잘 안돼서, Clean 했다가 Pub Get 해봤다가 Pub Upgrade도 해봤다가 하니, 잘 됐다.
GradleExceptuon 부분은 계속 오류나서, FileNotFoundException로 교체했다.
Dart 패키지 문제
또 오류를 뿜어내길래, 구글링을 해보니 문제를 알려주는 창이 있었다.
https://stackoverflow.com/questions/65502943/library-dart-packages-has-broken-classes-path
Library Dart Packages has broken classes path
The Flutter project seems that the cache doesn't exist or what. and it can't 'fit' in fact. Someone who can do me a favor. thanks As below:
stackoverflow.com
그냥 Fix 누르고 Remove? 뭐 그런 거 누르면 해결이 된다.
'기타 > Flutter' 카테고리의 다른 글
플루터 sdk 버전 바꾸기 (0) | 2022.02.25 |
---|---|
안드로이드 스튜디오 폰트 크기 단축키 설정하기 (0) | 2022.02.22 |
플루터 Window 개발 환경 세팅하기 (0) | 2022.02.18 |
플루터 맛보기 (0) | 2022.02.18 |