Search code examples
javaandroidzipinputstream

ZipInputStream(BufferedInputStream, Charset) is undefined


I did this question and I saw that exist a constructor of ZipInputStream called:

ZipInputStream(BufferedInputStream, Charset)

but the debugger throws me the error:

ZipInputStream(BufferedInputStream, Charset) is undefined

and give me the advice:

remove the argument to match ZipInputStream(InputStream)

I have installed the latest JDK and JRE 7 but I still have the same error.

Finally I solved the problem here:

Extracting file with ZipInputStream error UTFDataFormatException


Solution

  • If you programm an android app you're using the android libraries. The android ZipInputStream has no public constructor with signature ZipInputStream(InputStream, Charset). It doesn't matter what JDK or JRE you install on your PC, since you're app will not run on the PC (or on the PC but in an emulator).