问题描述
我正在使用使用地图API的示例应用程序并获取以下错误:
Package xxx requires unavailable shared library com.google.android.maps; failing!
我已经从我的调试证书指纹中获取了映射API密钥,并因此将其插入到我的主XML文件中:
<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文件加载到我的设备上.我做错了什么或没有做对的是什么?还有什么需要知道帮助回答这个问题?
我在另一台设备上尝试了这个(android 2.3;收到错误的设备是2.1),它有效.我注意到的一件事是在2.1设备上,Maps.jar文件的权限是-rwxrwxrwx,并且在2.3设备上它们是-rw-r - r--.可以为错误贡献吗?
推荐答案
问题解决了.我缺少文件/system/etc/permissions/com.google.android.maps.xml,也需要. FWIW,我正在使用粗糙化的Android设备,该设备不附带谷歌地图jar或XML文件.这就是为什么我必须自己添加它们.
问题描述
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?
推荐答案
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.