简体   繁体   English

Android APK扩展文件将不会下载

[英]Android APK expansion file won't download

I have a big issue with the download of an apk expansion file. 我对apk扩展文件的下载有很大的疑问。 I have read the tutorial http://developer.android.com/google/play/expansion-files.html and copied the code from the sample. 我已阅读了http://developer.android.com/google/play/expansion-files.html教程,并已从示例中复制了代码。 I uploaded everything on the developer console. 我在开发者控制台上上传了所有内容。 Also the download won't work. 同样,下载将不起作用。 I don't get any error messages. 我没有收到任何错误消息。 The app starts, the download view appears and nothing else happens. 该应用程序启动,出现下载视图,并且没有其他任何反应。 I also tried to debug the app. 我也尝试调试该应用程序。 But all I see is that the App gets the response "NO_DOWNLOAD_REQUIRED" also the file is definitely not available on the device. 但是我所看到的只是该应用程序收到响应“ NO_DOWNLOAD_REQUIRED”,而且该文件在设备上绝对不可用。

EDIT: I just see that when I delete the app and make a fresh build I get the status message "XAPK File Validation Failed". 编辑:我只是看到当我删除该应用程序并进行全新的构建时,我得到状态消息“ XAPK文件验证失败”。 But only for the first start, after that nothing happens. 但仅是第一次开始,之后什么也没有发生。 Could it be that the filesize has to be exact? 可能是文件大小必须准确吗?

private static final XAPKFile[] xAPKS = {
            new XAPKFile(
                    true, 
                    1, 
                    508443334L 
            )        
    };

If so how do I get the exact size? 如果可以,我如何获得准确的尺寸?

Yes, define exact filesize of obb archive is one of requirements for using expansion APK file. 是的,定义obb存档的确切文件大小是使用扩展APK文件的要求之一。

For windows: open cmd -> move to folder with expansion file -> type "dir" command 对于Windows:打开cmd->移至带有扩展文件的文件夹->输入“ dir”命令 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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