Android 下载失败,因为找不到资源
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23758695/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Download failed because the resources could not be found
提问by deko
Obb files download in my projects stopped working recently for all my unpublishedapplications. The error string is in the topic. But it works for publishedapplications (that may be the clue)!
我的项目中的 Obb 文件下载最近停止为我所有未发布的应用程序工作。错误字符串在主题中。但它适用于已发布的应用程序(这可能是线索)!
My device is Nexus 7 (2012), I upgraded it to 4.4.2 recently (that may be another clue).
我的设备是 Nexus 7 (2012),我最近将它升级到 4.4.2(这可能是另一个线索)。
The error comes from class com.google.android.vending.expansion.downloader.impl
错误来自类 com.google.android.vending.expansion.downloader.impl
public void applicationError(int errorCode)
is called with errorCode 3
. I wonder if anybody knows what it means.
用 调用errorCode 3
。我想知道有没有人知道这是什么意思。
Any suggestions how to make obb files download work are appreciated!
任何有关如何使 obb 文件下载工作的建议表示赞赏!
回答by ben75
errorCode 3 means that the downloaded file don't comes from the market.
errorCode 3 表示下载的文件不是来自市场。
You probably need to check the "Allow installation of apps from unknown sources" in device security settings.
您可能需要检查设备安全设置中的“允许安装来自未知来源的应用程序”。
回答by rkeller
There are a few things to consider when the device is not downloading the expansion files.
当设备不下载扩展文件时,需要考虑一些事项。
You can read more about testing the expansion file downloads here.
您可以在此处阅读有关测试扩展文件下载的更多信息。
Make sure the application you want to test has been published in the developer's console. It will take a few hours to publish once you have done this, so you might want to publish the day before you test. You can publish to alpha while testing so you don't have to release it to the market in order to test.
Make sure you're logged into the device using an account that is registered as a tester of the app.
Make sure that your device is listed in the list of approved devices on the developer's console. I think all devices are approved by default.
Make sure that the version number of the expansion file that you have listed on the test app is the same version number that is on the developer's console itself.
This may not be required, but if you haven't published the app to the store, make sure that you're using a build with the same signature as the app on the developer's console.
确保您要测试的应用程序已在开发人员的控制台中发布。完成此操作后将需要几个小时才能发布,因此您可能希望在测试前一天发布。您可以在测试时发布到 alpha 版本,这样您就不必将其发布到市场上进行测试。
确保您使用注册为应用测试人员的帐户登录设备。
确保您的设备列在开发人员控制台上的已批准设备列表中。我认为所有设备都是默认批准的。
确保您在测试应用程序上列出的扩展文件的版本号与开发者控制台本身的版本号相同。
这可能不是必需的,但如果您尚未将应用发布到商店,请确保您使用的版本与开发者控制台上的应用具有相同的签名。
From my experience, it's some combination of these that are giving you an issue.
根据我的经验,正是这些因素的某种组合给您带来了问题。
回答by isamirkhaan1
I had this same issue while testing APK expansion files. My mistake copied files from the downloader_library sample and didn't change file sizes.
我在测试 APK 扩展文件时遇到了同样的问题。我的错误是从 downloader_library 示例中复制了文件,但没有更改文件大小。
private static final XAPKFile[] xAPKS = {
new XAPKFile(
true, // main file
1, // APK version
7157821 // file size in bytes (was mistaken here)
), new XAPKFile(
false, // patch file
1, // APK version
891598// length of patch file
)
};
回答by Tuyen Bui
private static final XAPKFile[] xAPKS = {
new XAPKFile(
true, // main file
1, // APK version
7157821 // file size in bytes (was mistaken here)
), new XAPKFile(
false, // patch file
1, // APK version
891598// length of patch file
)
};