套件xxx需要不可用的共享库-Maps API [英] Package xxx requires unavailable shared library - Maps API
问题描述
我正在使用一个使用Maps API的示例应用程序,并遇到以下错误:
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!
我已经从调试证书指纹中获取了Maps API密钥,并将其插入到我的主要xml文件中:
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" />
我还已经将maps jar文件加载到了我的设备上.我做错了什么或做错了什么?您还需要知道什么才能帮助回答这个问题?
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?
我在另一台设备(Android 2.3;遇到错误的设备为2.1)上尝试了此操作,并且可以正常工作.我注意到的一件事是,在2.1设备上,maps.jar文件的权限为-rwxrwxrwx,而在2.3设备上,权限为-rw-r--r--.会导致错误吗?
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?
推荐答案
问题已解决.我缺少文件/system/etc/permissions/com.google.android.maps.xml,这也是必需的. FWIW,我正在使用一款不带google map jar或xml文件的耐用型Android设备.这就是为什么我必须自己添加它们.
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.
这篇关于套件xxx需要不可用的共享库-Maps API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!