When I try to close a socket through its Closeable interface, I get an exception:
new java.net.Socket().close();
// no error
((java.io.Closeable) new java.net.Socket()).close();
// Throws: java.lang.IncompatibleClassChangeError: interface not implemented
Why is that? The problem is only on Android devices, not on Java programs running on desktop.