问题
I am working with a sample app that uses the Maps API and getting the following error:
Package xxx requires unavailable shared library com.google.android.maps; failing!
I have obtained a Maps API key from my debug certificate fingerprint and inserted it into my main xml file thusly:
<com.google.android.maps.MapView
android:id="@+id/mapmain"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:apiKey="lotsoflettersandnumbers" />
I have also loaded the maps jar file onto my device. What am I doing wrong or not doing right? What else do you need to know to help answer this question?
I tried this on another device (Android 2.3; the device getting the error is 2.1) and it works. One thing I noticed is that on the 2.1 device, the permissions for the maps.jar file are -rwxrwxrwx, and on the 2.3 device they are -rw-r--r--. Could that be contributing to the error?
回答1:
Problem solved. I was missing the file /system/etc/permissions/com.google.android.maps.xml, which is also required. FWIW, I am working with a ruggedized Android device that does not come with the google maps jar or xml files on it. That's why I had to add them myself.
来源:https://stackoverflow.com/questions/9984131/package-xxx-requires-unavailable-shared-library-maps-api