简体   繁体   中英

I want to unzip my animation.zip file in to the res/drawable-hdpi

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();
}

This is what i have done.

I am able to unzip my animation.zip file on sdcard but i want to unzip it in res/drawable-hdpi folder.

You can never unzip a zip file to res folder. In mobile, you can unzip it to an SD card or your data/data folder. I think you want to change app's skin this way, but it is impossible. If you want to change the skin follow this Android add extra skin as separate APK

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM