[英]Android: Parse error when parsing manifest. Discontinuing installation
I know this question has been asked to death here, but I am unable to find the solution in all of the offered answers and its driving me crazy. 我知道这个问题已经在这里被要求死了,但是我无法在所有提供的答案中找到解决方案而且它让我疯狂。
I have an app which I have set up to download updates from my own server. 我有一个应用程序,我已设置从我自己的服务器下载更新。 This update installs fine on some types of phones but fails on others (namely the Droid Incredible 2). 此更新在某些类型的手机上安装正常但在其他手机上安装失败(即Droid Incredible 2)。
The error it alerts when I try to install an update on SOME phones is: 我尝试在SOME手机上安装更新时发出的错误是:
"Parse Error: There is a problem parsing the package." “解析错误:解析包时出现问题。”
The logcat shows: logcat显示:
INFO/ActivityManager(1482): Starting activity: Intent { act=android.intent.action.VIEW dat=file:///mnt/sdcard/download/application.apk typ=application/vnd.android.package-archive cmp=com.android.packageinstaller/.PackageInstallerActivity } from pid 4620
WARN/PackageParser(2528): Skipping dir: /mnt/sdcard/download/application.apk
WARN/PackageInstaller(2528): Parse error when parsing manifest. Discontinuing installation
What else could I possibly be doing wrong? 还有什么我可能做错了?
edit: I uploaded this app to the Android Market...when I try to install on the troubled phones, I get an alert saying "Package file was signed incorrectly". 编辑:我将此应用程序上传到Android电子市场...当我尝试在有问题的手机上安装时,我收到一条警告说“包文件签名不正确”。 On the other phones, it downloads and installs just fine. 在其他手机上,它下载和安装就好了。
问题是我正在更新最初通过adb安装的应用程序,而不是通过市场。
If you are trying to download an apk than install it programmatically, be careful to use AsynTask or propery perform threading. 如果您尝试下载apk而不是以编程方式安装它,请小心使用AsynTask或propery执行线程。 I used to face the same error because the activity used to grab an incomplete apk to install it. 我曾经面对同样的错误,因为用于抓取不完整的apk来安装它的活动。
I use AsynTask now. 我现在使用AsynTask。 doInBackground (does the downloading), onPostExecute( adds the pending intent and calls startActivity to open the installation screen). doInBackground(下载),onPostExecute(添加挂起的intent并调用startActivity打开安装屏幕)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.