본문 바로가기

error4

[Android/Error] 안드로이드 error: cannot find symbol @dagger.hilt.InstallIn(value = {ApplicationComponent.class}) Dagger Hilt를 업데이트하고 나서 Build를 하니깐 아래와 같은 에러가 발생했습니다. error: cannot find symbol @dagger.hilt.InstallIn(value = {ApplicationComponent.class}) ApplicationComponent 가 SingletonComponent 으로 이름이 변경되었다고 합니다. Ctrl + Shift + F 를 통해서 ApplicationComponent를 찾아서 SingletonComponent로 변경했더니 잘 되네요.. 기리's Android 이야기 2021. 2. 5.
[Android/Error] 안드로이드 java.lang.IllegalStateException: An instance of OnFlingListener already set. 안녕하세요. 오늘은 RecyclerView에서 SnapHelper를 적용하는 도중에 아래와 같은 에러가 생겼습니다. java.lang.IllegalStateException: An instance of OnFlingListener already set. OnFlingListener 인스턴스가 이미 존재하는 에러라는데... OnFlingListener 리스너를 한번 찾아 봤는데 아래와 같은 설명이 있었습니다. This class defines the behavior of fling if the developer wishes to handle it. Subclasses of RecyclerView.OnFlingListener can be used to implement custom fling behavior.. 기리's Android 이야기 2021. 2. 4.
[Android/Error] 안드로이드 NullPointerException: WindowInsetsController... FullScreen 화면을 구현 하던 중 WindowManager.LayoutParams.FLAG_FULLSCREEN가 Deprecated 되어서, 아래와 같이 새로운 코드를 추가하던 중 에러가 발생했습니다. class SplashActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { window.insetsController?.hide(WindowInsets.Type.statusBars()) } else { window.setFlags( Window.. 기리's Android 이야기 2021. 2. 4.
[Android/Error] 안드로이드 ViewModelProvider 에러발생 VIewModel을 사용하던 중 에러가 발생했습니다. 에러가 발생했던 코드 부분입니다. MainViewMdoel를 생성할 때 찾을 수 없다는 에러였습니다. mainViewModel = ViewModelProvider(this).get(MainViewModel::class.java) 파라미터로 owner 객체뿐만 아니라 factory 객체를 만들어서 넘겨서 같이 해결했습니다. [MainActivity.kt] mainViewModel = ViewModelProvider(this, MainViewModel.Factory(application)).get(MainViewModel::class.java) [MainViewModel.kt] class Factory( private val application: App.. 기리's Android 이야기 2021. 1. 31.