问题测试APK扩展库 [英] Problems testing APK expansion library

查看:122
本文介绍了问题测试APK扩展库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经集成来自谷歌的APK文件的扩展库下载到我的项目,它的工作或多或少OK(除了一些小陷阱,其中已报告了其他人的话)。

I've integrated the APK Expansion file download library from Google into my project, and it works more or less OK (except a few minor gotchas, which have been reported by others on SO already).

不过,我也很难对其进行测试。当我第一次测试它,我上传了我的签署APK +主膨胀文件版本1至谷歌播放,而且效果不错。

However, I have a hard time testing it. When I was first testing it, I uploaded my signed APK + main expansion file version 1 to Google Play, and it worked well.

然而,当我升级我的应用程序,再加上主膨胀文件版本2,应用程序再也无法下载文件 - 库立即用NO_DOWNLOAD_REQUIRED返回,但该文件不存在!我开始调试拉特查遍,但下载的文件表是空的!当我试图细节调试......它突然开始工作了!

However, when I upgraded my application, together with main expansion file version 2, the application could no longer download the file - the library immediately returns with NO_DOWNLOAD_REQUIRED, but the file is not there! I started debugging the LVL check passes, but the downloadable files table was empty! While I was trying to debug the details... it suddenly started to work again!

我以为这是一种暂时的故障,并继续我的工作,只是为了再次击中了同样的问题,再次更新我的APK和扩展文件之后。应用程序将拉特查,但同样库假定没有任何文件下载。

I assumed this was a sort of temporary glitch and continued my work, just to hit the same issue again, after updating my APK and expansion file again. Application passes the LVL check, but again library assumes there are no files to download.

它是一个已知的问题与谷歌的图书馆?或许我需要等待一些时间,直到文件可在谷歌的云计算?

Is it a known problem with Google's library? Or perhaps I need to wait some time until the files is available on Google's cloud?

编辑:它刚开始工作确定。这真的好像它需要一些时间,该文件以某种方式传播谷歌的一面。关于图书馆的一个恶劣的是,一旦验证许可证,它永远不会再次检查下载列表,所以我不得不重新安装应用程序。奇怪...见鬼,为什么会这样复杂?

It just started working OK. It really seems it needs some time for the file to somehow propagate on Google's side. One bad thing about the library is that once it validates the license, it never checks the download list again, so I had to reinstall the app. Weird... Why the heck is it so complex?

推荐答案

在APK +扩展的工作流程还有其他非直观和无证陷阱,除了由作者描述的传播时间:

The APK + Expansion workflow has other non-intuitive and undocumented gotchas, besides the propagation time described by the author:

  1. 增加APK版本code,但继续使用相同的(旧)扩展文件。看来,如果你不上传新的APK你的开发者控制台,下载将不会从更新的应用程序工作(直接安装使用亚行)。该错误信息是没有帮助的之一:下载失败,因为资源不能找到。对我来说,它看起来像谷歌的说:好吧,我知道这个文件的扩展版本,但我不知道这个程序的版本。我没有找到任何提及这一要求当前文档。

  1. Increase the APK versionCode but keep using the same (old) Expansion file. It seems that if you do not upload the new APK to your developer console, the download won't work from the updated app (directly installed using adb). The error message is not helpful either: "download failed because the resources could not be found". To me it looks like Google is saying "Ok, I know about this Expansion file version, but I don't know about this app version". I didn't find any reference to this requirement in the current documentation.

新的APK上传到开发者控制台似乎捕捉从旧APK扩展文件关联。例如:如果你删除了新的APK(但保留旧的,它具有相同的版本扩展),扩展文件似乎消失为好。也许他们认为工作流程将是:我们必须扩展使用新的APK关联,以使开发人员可以自由擦除旧的APK没有任何问题。仍然这是另一个疑难杂症似乎没有在任何地方进行说明。

New APK uploaded to developer console seems to "capture" the Expansion file association from the old APK. Example: If you delete the new APK (but keeping the old, which has the same version as the Expansion), the Expansion file seems to go away as well. Perhaps they thought the workflow would be "we must associate the Expansion with the new APK, so the developer is free to erase the old APK without any problem". Still this is another gotcha that doesn't seem to be described anywhere.

这些都是preliminary笔记。我提出这可能证实这些发现让我将在这里发布更新支持请求时(如?)他们回答...

These are preliminary notes. I submitted a support request which might confirm these findings so I will post updates here when (if?) they reply...

这篇关于问题测试APK扩展库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆