Search code examples
androidzip4j

compress file with zip4j on android


I need to add files on a zip package but on the line code zipFile.addFiles(filesToAdd, parameters)" the "addFiles() appears in red, can anyone help me, please?

I'm using:

image reference:

https://lh6.googleusercontent.com/HTfDOT1yZBb7k-oxLulCYukhBMv7xksHj2UhK-_YXSAkNmpQKkgdrSCJpa4T3cs1vWMNnHBWPxwkbKM=w1342-h513-rw


Solution

  • Zip file format is "native" in Java. Reading and writing those files are implemented out of the box by the java toolkit http://www.mkyong.com/java/how-to-compress-files-in-zip-format/

    No need of add-ons.