이 로그가 무슨 의미인지 몰라서 한참 헤맸다.
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{메인액티비티}: androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment 커스텀다이얼로그프래그먼트: could not find Fragment constructor
...
Caused by java.lang.NoSuchMethodException: 커스텀다이얼로그프래그먼트.<init> []
https://developer.android.com/reference/android/app/Fragment.html#Fragment()
stackoverflow.com/a/64470785/9287140
developer.android.com/reference/androidx/fragment/app/FragmentFactory
Every fragment must have an empty constructor, so it can be instantiated when restoring its activity's state. It is strongly recommended that subclasses do not have other constructors with parameters, since these constructors will not be called when the fragment is re-instantiated;
커스텀 다이얼로그 프래그먼트의 생성자는 클릭 리스너를 받는 생성자 하나만 있었다.
'빈 구멍 채우기' 카테고리의 다른 글
[Kotlin Coroutine] Flow - 1 (0) | 2021.04.07 |
---|---|
[Kotlin Coroutines] Job (0) | 2021.04.01 |
[Android] Using WebView from more than one process at once with the same data directory is not supported. / AwDataDirLock.java / org.chromium.android_webview.AwDataDirLock.b (0) | 2021.03.29 |
[Android/Crashlytics] libc.so / unknown 이슈 - native crash (0) | 2021.03.29 |
[Kotlin] Companion Object의 활용 (0) | 2021.03.29 |