> In general, no Java library works on Android except by happy coincidence
This is not true at all.
Every single library I have ever added in my build.gradle has always worked. Every. Single. Time.
Even libraries that were compiled with Java 8, which is the most baffling thing, if you think about it (since Android doesn't support Java 8).
Most of these libraries were compiled and deployed to the Maven repo by Java developers who had no idea whether their library was going to be used on Android. And yet, it does.
This is no happy coincidence.