Package xxx requires unavailable shared library - Maps API

走远了吗. 提交于 2019-12-24 06:44:09

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!