我做了this问题,发现存在一个名为ZipInputStream的构造函数:ZipInputStream(BufferedInputStream, Charset)
但是调试器向我抛出错误:ZipInputStream(BufferedInputStream, Charset) is undefined
并给我建议:remove the argument to match ZipInputStream(InputStream)
我已经安装了最新的JDK和JRE 7,但仍然有相同的错误。
最后我在这里解决了这个问题:
Extracting file with ZipInputStream error UTFDataFormatException
最佳答案
如果您对一个android应用程序进行编程,则说明您正在使用android库。 android ZipInputStream
没有带有签名ZipInputStream(InputStream, Charset)
的公共构造函数。您在PC上安装什么JDK或JRE都没有关系,因为您的应用程序不会在PC上运行(或在PC上但在仿真器中)。