Hi, I’m kotest newbie. I just run ViewModel test b...
# kotest
m
Hi, I’m kotest newbie. I just run ViewModel test but I’ve been stuck in some error. Here is the error
Copy code
io.kotest.engine.extensions.ExtensionException$BeforeEachException: java.lang.NoSuchMethodError: 'androidx.lifecycle.LiveData androidx.lifecycle.Transformations.distinctUntilChanged(androidx.lifecycle.LiveData)'
io.kotest.engine.extensions.MultipleExceptions: io.kotest.engine.extensions.ExtensionException$BeforeEachException: java.lang.NoSuchMethodError: 'androidx.lifecycle.LiveData androidx.lifecycle.Transformations.distinctUntilChanged(androidx.lifecycle.LiveData)'
This error might be related to Android issues, but I have no idea. Is there any ways to test for Transformations(livedata) with Kotest?
s
Looks like version mismatch to me
m
oh really? which libraries should I check?
s
Well it lokos like the androidx.lifecycle one is trying to use a method that doesn't exist
m
I thought that, too. But, it just happens after kotest verion(latest version) is uodated, which is crazy.
s
hmmm, maybe soemthing that androidx uses got bumped at the same time
if you're on kotest 5.4.x make sure you're on kotlin 1.6+ and coroutines 1.6.4
m
Ok, thanks a lot. Androidx lib might cause this issues. Actually, I've updated kotest, kotlin and some androidx library to use compose.
But there is nothing with googling, so I have no choice to ask it this channel.
s
I would try using the original androidx lib
m
Thanks bro