Larry B
Larry B

Reputation: 193

How to import Google's libphonenumber library into KMP common"

I would like to import [libphonenumber] into the 'common' part of a KMP project, but Kotlin can't import it. I see the library added twice to the external libraries after I added the maven url. But, the import in Kotlin can't resolve the library, so I can't use the libraries classes. What am I missing?

Upvotes: 3

Views: 517

Answers (2)

luca992
luca992

Reputation: 1593

Started a port of kotlin multiplaform port of libphonenumber here https://github.com/luca992/libphonenumber-kotlin

Upvotes: -1

Kevin Galligan
Kevin Galligan

Reputation: 17342

libphonenumber isn't a Kotlin Multiplatform library. It seems to support many platforms, so you could write library wrappers for Kotlin.

I gave a talk about writing platform wrapper libraries: https://vimeo.com/371460823

If the target for native is C++, you'll likely need to write some C wrappers. Just FYI.

Upvotes: 2

Related Questions