Unzipping zip file gives “java.util.zip.ZipException: Cannot read version” or “java.util.ZipException Cannot read local header version 45”
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I would like just to extract a normal zip file, but it keeps failing. This is my code I'm using now: private File downloadPath = new File(Environment.getExternalStorageDirectory() + "/Test/file.zip"); private File unzipLoc = new File(Environment.getExternalStorageDirectory() + "/Test/"); FileInputStream fin = new FileInputStream(downloadPath); ZipInputStream zin = new ZipInputStream(fin); ZipEntry ze = null; while ((ze = zin.getNextEntry()) != null) { FileOutputStream fout = new FileOutputStream(unzipLoc + ze.getName()); for (int c = zin