包 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" />
我还将地图 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,我正在使用坚固耐用的 Android 设备,该设备上没有谷歌地图 jar 或 xml 文件.这就是为什么我必须自己添加它们.
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屋!