“There is a problem parsing the package”

2019-04-24 05:15发布

问题:

I have encounter a problem installing my Android app. The user gets the dreaded “There is a problem parsing the package” error. Unfortunately, it installs without error on my phone. At this point, I am dealing with two phones both of which are running Android OS 2.2.1. I have built the application for API Level 7. To save the read the trouble of looking this up, it supports devices from 2.1.

I have been working with this for a month or so. When I want to show the user the latest build, I send it via email. Initially, this worked fine for both of us. During this process both devices where setup to allow installation from “Unknown Sources".

The development phone has always worked. Starting with last weeks build, the user is receiving the error mentioned earlier. I know this is a common error based on a google search. Unfortunately, most of the posts are from user’s grasping in the dark. Naturally I have read the other half dozen or so post on this forum which are clearly from expert developers. This is arguably the best. My situation appears a bit different because I have confirmed it isn't the API Level.

I do not find this error very informative. If I can get my hands on the device, I suspect I should see the problem with on-device debugging. Unfortunately, I do not have the device. So I am reading the source for PackageInstallerActivity. A quicker way to pay dirty is desirable. Is there some thing the user can do to glean more information? Do you have debugging suggestions to resolve this problem?

回答1:

There are many apps that will allow the user to send you the Log output of what is going on SendLog is one of such apps you can find it on the Market. As for why it is happening, do you have this app on the market also? If so the test versions that eclipse builds are going to be signed with a test signature which will not allow them to be installed if the market version is already installed (or vice versa). Either way have this person be sure to uninstall any previous versions of your application and then try to install the current one, this will rule out non-equal signatures as the problem. (you should try this even if you don't have your app on the market, debug signatures have a much shorter left time than real ones so its possible that yours expired and eclipse made you a new one without you knowing, this would then disallow the app to be installed with any previous versions already installed.)