I get this runtime error and don't know how to fix:
java.lang.NoSucheMethodError: java.io.FileInputStream.transferTo(Ljava/io/OutputStream;)J
This happens while using the transferTo method from a FileInputStream to a ZipOutputStream
FileInputStream fis = new FileInputStream(file);
ZipEntry zipEntry = new ZipEntry(fileName);
zos.putNextEntry(zipEntry);
try {
fis.transferTo(zos);
} catch (NoSuchMethodError e) {
e.printStackTrace();
}