java.lang.NoSuchMethodError: No virtual method elapsedNow()D in class Lkotlin/time/TimeMark

Aydinozkan picture Aydinozkan · Aug 13, 2020 · Viewed 7.2k times · Source

I have recently updated the version of Kotlin to 1.4.0-rc.

Since then Koin is returning the run time error below:

java.lang.NoSuchMethodError: No virtual method elapsedNow()D in class Lkotlin/time/TimeMark

Answer

Aydinozkan picture Aydinozkan · Aug 13, 2020

Apparently this issue is due to the usage of androidLogger() together with Koin. There is only a workaround for now, which is migrating from androidLogger() to androidLogger(Level.ERROR)

There is already an issue created for this purpose:

https://github.com/InsertKoinIO/koin/issues/847