Apk Expansion File Downloading occurs frequently in anrdroid.why so happens?

270 Views Asked by At

I've developed an android application using expansion library.

I've used required strategy to create and upload expansion file.I've uploaded the apk and main expansion file in play store.And they're saved as draft,not published.While I installed this apk and tested it in my device sometimes after it being uploaded apk expansion file downloading occurs.But when I tried after sometimes it shows "Download failed because the resources could not be found".

I used only main expansion file.My app version code is 5 and expansion file is 17509413 bytes in size.

My code snippet is as follows:

private static final XAPKFile[] xAPKS = 
{
            new XAPKFile(

         true,

                    5,17509413L 
            )      
    };

Can anyone help me please?

Thanks in advance.

1

There are 1 best solutions below

0
On

specify size in bytes as same as your expansion file size.

private static final XAPKFile[] xAPKS =
                   {new XAPKFile(true,     // true signifies a main file
                               5 ,       // the version of the APK that the file was uploaded
                               17509413L // the length of the file in bytes)
                   }