요약
kotlin 파일에 패키지명(package com.example.패키지명)이 쓰여있는지 확인
Flutter앱이 에러도 없는데 실행하자마자 꺼졌다.
Logcat에 error부분을 보니
java.lang.RuntimeException : Unable to instantiate activity ComponentInfo라고 쓰여있었다.
에러를 읽어보니 Caused by: java.lang.ClassNotFoundException : Didn't find class "com.~~이라고 쓰여있어서 kotlin 파일에 문제인가 하고 MainActivity.kt파일을 열어보았다.
알고보니 맨 위에 패키지명을 빼먹었다..
package com.example.패키지명을 써주니 정상적으로 작동되었다.
'Flutter' 카테고리의 다른 글
[Flutter] ERROR : No application found for TargetPlatform.android_arm64 (0) | 2023.03.03 |
---|---|
[Flutter] Could not resolve all artifacts for configuration ':classpath'. 해결 (0) | 2023.02.09 |
[Flutter] Execution failed for task ':app:compileDebugKotlin'. 해결 (0) | 2023.02.07 |
[Flutter] 상태바로 인한 화면 잘림 해결하기 (+ 앱 화면 크기 가져오기) (3) | 2022.12.20 |
[Flutter] firebase에 이미지 저장하기 (0) | 2022.12.19 |