Recently I tried to run my application in the emulator, and got this
error:

[2009-08-27 07:50:26 - FixedGears] Installation error:
INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION
[2009-08-27 07:50:26 - FixedGears] Please check logcat output for more
details.

logcat was rather unhelpful. The only message that possibly was giving
a hint was the following:
W/PackageParser(  583): java.lang.UnsupportedOperationException: Can't
convert to integer: type=0x3

Notice that the first error message has the word "PARSE" in it while
the second error is from "PackageParser".

So what's the problem?  It turns out that it was my Manifest.xml.   In
order to publish my app on the Market, my Manifest file needs a
versionCode and a versionName.  I set the versionName to use a string
from my string.xml file.  The versionCode is also a string, so I also
referenced a string from string.xml:
android:versionCode="@string/version_num" where version_num="31".

The error results because the installer requires an integer value for
versionCode, even though in AndroidManifest.xml the value is contained
within quotes. The installer does not parse strings pulled in from
strings.xml into integer values, so the installation fails.    As soon
as I replaced the reference to strings.xml and simply used a value of
31 for versionCode, the installation succeeded.

Hope this helps someone.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to