【问题标题】:I want to unzip my animation.zip file in to the res/drawable-hdpi我想将我的 animation.zip 文件解压缩到 res/drawable-hdpi
【发布时间】: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 文件夹中。

【问题讨论】:

    标签: android zip4j


    【解决方案1】:

    您永远无法将 zip 文件解压缩到 res 文件夹。在移动设备中,您可以将其解压缩到 SD 卡或您的数据/数据文件夹中。我认为您想以这种方式更改应用程序的皮肤,但这是不可能的。如果你想换皮肤,请关注这个Android add extra skin as separate APK

    【讨论】:

    • 不,我想解压缩该目录和 wnt 以在帧动画中使用。如果你能帮助我,请帮助我
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-12-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-07-27
    相关资源
    最近更新 更多