prisma-archive / cuid-java

Collision-resistant IDs for Java (like UUID)
54 stars 8 forks source link

Support for Android #1

Open ZakTaccardi opened 8 years ago

ZakTaccardi commented 8 years ago
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)
marktani commented 8 years ago

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

marktani commented 8 years ago

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.