【发布时间】:2014-11-22 05:47:45
【问题描述】:
public void onClick(View v)
{
try {
// Initiate ZipFile object with the path/name of the zip file.
ZipFile zipFile = new ZipFile("/sdcard/animation.zip");
// Extracts all files to the path specified
zipFile.extractAll("/sdcard/");
} catch (ZipException e) {
e.printStackTrace();
}
Toast.makeText(getApplicationContext(), "button clicked", Toast.LENGTH_LONG).show();
}
这就是我所做的。
我可以在 sdcard 上解压缩我的 animation.zip 文件,但我想将其解压缩到 res/drawable-hdpi 文件夹中。
【问题讨论】: