반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- 광 센서
- 웹코드빌드
- LayoutParmas
- phpstorm
- 회전 센서
- Android
- utf8mb4
- 온라인IDE
- 금속 탐지기 센서
- ARGB
- Exoplayer
- 동영상 실행
- setBackgroundResource
- BottomSheetDialog
- 온라인코딩
- Kotlin
- 온라인무료코딩사이트
- 걸음 감지 센서
- mysql 5.7
- 코틀린
- 걸음수 감지 센서
- lateinit
- Android Studio 3.6
- RecyclerView
- 자격증
- powercfg
- Aplha
- 자기장 센서
- 온라인에디터
Archives
- Today
- Total
Memory
[ANDROID/KOTLIN] lateinit 초기화 여부 확인 본문
반응형
private lateinit var mContext: Context
// 초기화 되었는지 확인하는 방법
// ::변수명.isInitialized
if (::mContext.isInitialized){
// 초기화 되어있을 경우
}
[참고]
출처 :
UninitializedPropertyAccessException: lateinit property has not been initialized
I have a class which i inject into a ViewModel + ViewModel factory, when initialise the view model in the onCreate method in activity, its says the value being passed through is not initialised. ...
stackoverflow.com
반응형