我做了this问题,我看到存在一个名为 ZipInputStream 的构造函数:
ZipInputStream(BufferedInputStream, 字符集)
但是调试器向我抛出错误:
ZipInputStream(BufferedInputStream, Charset) 未定义
并给我建议:
删除参数以匹配 ZipInputStream(InputStream)
我已经安装了最新的JDK和 JRE 7 但我仍然有同样的错误。
最后我在这里解决了问题:
Extracting file with ZipInputStream error UTFDataFormatException
最佳答案
如果您编写 Android 应用程序,您将使用 Android 库。 android ZipInputStream
没有带有签名 ZipInputStream(InputStream, Charset)
的公共(public)构造函数。您在 PC 上安装什么 JDK 或 JRE 并不重要,因为您的应用程序不会在 PC 上运行(或在 PC 上但在模拟器中运行)。
关于java - ZipInputStream(BufferedInputStream, Charset) 未定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24525139/