Closed tusharjha44 closed 2 years ago
same issue
@tusharjha44
version_core = "1.3.1" version_coroutine = "1.3.7" version_navigation = '1.0.0' version_constraint_layout = "2.0.0-rc1" version_gradle = '4.0.1' version_kotlin = "1.3.72" version_lifecycle_extensions = "2.2.0" version_lifecycle = "2.2.0" version_room = "2.2.5" version_appcompat = "1.2.0" version_fragment = "1.0.0"
I couldn't find any version which is 1.6.0 could you help me here
@tusharjha44 sent you request over linkedin, Could you connect with me there?
Hi @tusharjha44 @adityadav23 , did you end up figuring out why it was crashing?
fun ImageView.setSleepImage(item: SleepNight?){ item?.let { setImageResource(when (item.sleepQuality) { 0 -> R.drawable.ic_sleep_0 1 -> R.drawable.ic_sleep_1 2 -> R.drawable.ic_sleep_2 3 -> R.drawable.ic_sleep_3 4 -> R.drawable.ic_sleep_4 5 -> R.drawable.ic_sleep_5 else -> R.drawable.ic_sleep_active }) } }
I just had to add '?' to my SleepNight that was passed in!
After debugging it , I found that in ImageView app:sleepImage="@{sleepDtailViewModel.night} is responsible for app crash. If anyone know any solution please help me.