prisma-archive/cuid-java

Support for Android

ZakTaccardi opened this issue · 2 comments

E/UncaughtException: java.lang.NoClassDefFoundError: Failed resolution of: Ljava/lang/management/ManagementFactory;
                                                                                       at cool.graph.cuid.Cuid.getHostInfo(Cuid.java:24)
                                                                                       at cool.graph.cuid.Cuid.getFingerprint(Cuid.java:34)
                                                                                       at cool.graph.cuid.Cuid.<clinit>(Cuid.java:18)

Thanks for the report, I will have a look next week.

ManagementFactory is not a part of the VM Android is running on, but a part of the regular JVM. Right now, I don't see a good way to support both vanilla Java and Android in the same library. Maybe you got an idea? Feel free to create a PR if you've come up with a solution.