https://kotlinlang.org logo
Title
a

atsushieno

09/17/2021, 7:30 PM
I'm trying to build an MPP library which provides Composable functions that differentiate implementation using expect/actual on Desktop and Android, but I'm suffered from
java.lang.NoSuchMethodError: No static method: (mymethod)
at run time. Is it that compose compiler plugin does not resolve expect/actual stuff?
a

Adam Powell

09/17/2021, 8:07 PM
a

atsushieno

09/17/2021, 8:59 PM
That's looking almost identical...! Yet, I still see the same
NoSuchMethodError
even after I made changes to all arguments nullable - https://github.com/atsushieno/compose-mpp/commit/6b97cae
r

rsktash

09/18/2021, 6:51 AM
There is an issue with expect/actual methods with default param values As a workaround you should wrap it with normal mthods
a

atsushieno

09/18/2021, 11:11 AM
Bingo, removing the default args fixes the problem. Thanks folks!