Solve Kotlin/Native error: There is still an unbound symbol after generation of IR module <xxx>:

error message

There is still an unbound symbol after generation of IR module <xxx>:

Unbound public symbol IrSimpleFunctionPublicSymbolImpl: xxx

reason

One of the cases is that compose is used in kn (such as iOS target), but since this function cannot be called in its target (or it is meaningless to call this function), ir does not generate the corresponding function, but throws an exception

solution

At this time, there is a simple way to modify the method or class mentioned in the error message with internal or private

In this way, the functions that can be called in the corresponding target will not be generated.

Or use another way, that is to directly add an intermediate module, which can also solve this problem

epilogue

I don't know if the follow-up jb will deal with this problem?

You can refer to the official github, or refer to: ComposeViews/ios_shared at main ltttttttttttt/ComposeViews (github.com)

Guess you like

Origin blog.csdn.net/qq_33505109/article/details/129890923