SoftReference
SoftReference

Reputation: 7149

INSTALL_FAILED_MISSING_SHARED_LIBRARY

I have a map application. I want to install it on a device having no maps library available. Can't I burn in along the app.

Upvotes: 2

Views: 4348

Answers (1)

CommonsWare
CommonsWare

Reputation: 1006944

No, you can't "burn in along the app", unless you're a pirate. Google Maps is software that is licensed by device manufacturers or is obtained from the Android Market. If a device does not have it, there is nothing you can do about that fact.

There is an undocumented android:required attribute on the <uses-library> element. However, we have been told it is safe to use, that it being missing from the documentation is merely a documentation bug. You can use android:required="false" to allow your app to run on a device that lacks Google Maps. This does not magically add Google Maps, though, and so if you try to start a MapActivity, it will crash. But, using Class.forName(), you can see if MapActivity exists, and if it does not, do something else for your maps (e.g., WebView and Web-based Google Maps, OpenStreetMap).

Upvotes: 3

Related Questions