有没有kotlin-多平台通用函数来获取UUID/GUID?
// ideally something like this
val newUUID = UUID() // "1598044e-5259-11e9-8647-d663bd873d93"
println("newUUID = $newUUID")我不希望使用expect-actual创建单独的Android和iOS版本。
发布于 2019-03-30 06:11:55
那一个可能会工作https://github.com/benasher44/uuid
该项目的源代码使用Kotlin多平台项目来实现UUID库。有关详细信息,请参阅https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html
https://stackoverflow.com/questions/55424458
复制相似问题