I’m developing an app that uses the Google Maps api to give you a list of a given business type at runtime based on your current location.
I developed this on Eclipse using my LG Ally running Android 2.2.2 as a test device.
The QA team is not local to me so I emailed them the same apk file I installed on my phone.
Here’s where it gets strange.
One tester, was able to install the app and run it with no problems. That person is using a phone running Android 2.2.2 – just like I am, although I am unsure if their phone is an LG Ally.
The other person is using a phone running 2.3.3 and they are unable to run the app. They’ve installed an app that emails me the logcat output and the only message that looks even vaguely related is:
06-21 14:22:57.147 W/PackageInstaller( 8784): Parse error when parsing manifest. Discontinuing installation
I’ve read on Stackoverflow that the manifest must contain info about the sdk. My Android Manifest contains:
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="15"/>
I’ve also read on Stackoverflow that some people have problems installing apps emailed to them and suggested something like DropBox.
I’ve done both (included the above sdk line in my Manifest and delivered the app via DropBox) and they are still unable to run the app.
Which got me wondering about the Google Maps dependency. I’m not delivering the maps.jar file in my apk. Is there a way I can check that the maps.jar is available on the device where my app is running? Is there a way I can deliver the maps.jar file? What do I do if maps.jar is already present?
If you have
<uses-library>with theandroid:required="false"attribute, then your app can run even if the device lacks the Google Maps add-on for Android. You would useClass.forName()to see ifMapActivityexists before trying to actually use aMapActivity, as in this sample project.However, if your
<uses-library>lacks anandroid:requiredattribute, or has it set totrue, then the app simply cannot be installed on the device.Only in the form of buying the user another device — one that has the Google Maps add-on — and shipping it to them. Either the device has it (as do most devices that legitimately have the Play Store) or it doesn’t (e.g., Kindle Fire). You cannot change that fact.