프로그래밍/Flutter
-
Flutter Web을 FastAPI 서버로 배포할 때 Failed to load resource: the server responded with flutter.js:1 a status of 404 (Not Found)프로그래밍/Flutter 2023. 7. 9. 15:00
Flutter 웹앱을 FastAPI 서버를 통해 배포하려고 했는데 index.html에서 flutter.js 파일 경로를 찾지 못하여 에러가 발생했다. 해결방법은 아래와 같다. 1. FastAPI의 main.py에서 Flutter Web 빌드 경로를 StaticFile로 마운트함 from fastapi import FastAPI from fastapi.staticfiles import StaticFiles app = FastAPI() app.mount("/static", StaticFiles(directory="static"), name="static") 2. Flutter 웹앱을 빌드하고 만든 index.html에서 base 태그의 href 값을 1번에서 마운트할 때 정의한 경로로 수정하기
-
[Android Studio 트러블슈팅] Invalid constant pool index 25871 for field name in class file프로그래밍/Flutter 2023. 2. 19. 23:38
Android Studio에서 갑자기 빌드할 때 "Invalid constant pool index 25871 for field name in class file"라는 에러가 뜨면서 빌드가 안됐다 안드로이드 스튜디오에서 캐시도 지워보고, 안드로이드 스튜디오 설정 파일도 지워보고, 플러터도 다시 설치해봤지만 소용이 없었다. 그러다 아래 경로에 있는 캐시 폴더를 삭제하니 정상 작동하였다. C:\Users\사용자명\.gradle\cache