2012-03-26 109 views
4

首先,我在project \ properties \ android中設置了Project Build Target。 我使用Google API創建了Level 7和8的AVD,並將每個AVD設置爲SD卡大小4Gb,將SDK的最小版本設置爲7,將目標SDK設置爲Manifest文件中的8。沒有成功。 我刪除所有AVD並重新創建它們。Android:需要不可用的共享庫com.google.android.maps;失敗

重新安裝Eclipse Rcp,在Eclipse中安裝ADT和安裝的Android SDK後,再次創建AVD。

我的GPS應用程序在沒有Google API的情況下工作正常,在早期版本中我目前在MapView上實現了顯示軌跡日誌的視圖,我的應用程序無法正常工作。

DDMS沒有顯示從未發生過月蝕。

如何解決此錯誤?

[2012-03-26 09:27:50 - GPS] Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY 
[2012-03-26 09:27:50 - GPS] Please check logcat output for more details. 
[2012-03-26 09:27:51 - GPS] Launch canceled! 

這裏是logcat的錯誤日誌:

03-26 07:26:22.220: E/vold(27): Error opening switch name path '/sys/class/switch/test' (No such file or directory) 
03-26 07:26:22.220: E/vold(27): Error bootstrapping switch '/sys/class/switch/test' (No such file or directory) 
03-26 07:26:22.220: E/vold(27): Error opening switch name path '/sys/class/switch/test2' (No such file or directory) 
03-26 07:26:22.220: E/vold(27): Error bootstrapping switch '/sys/class/switch/test2' (No such file or directory) 
03-26 07:27:03.399: E/BatteryService(66): usbOnlinePath not found 
03-26 07:27:03.399: E/BatteryService(66): batteryVoltagePath not found 
03-26 07:27:03.399: E/BatteryService(66): batteryTemperaturePath not found 
03-26 07:27:03.420: E/SurfaceFlinger(66): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake 
03-26 07:27:27.730: E/EventHub(66): could not get driver version for /dev/input/mouse0, Not a typewriter 
03-26 07:27:27.730: E/EventHub(66): could not get driver version for /dev/input/mice, Not a typewriter 
03-26 07:27:28.440: E/System(66): Failure starting core service 
03-26 07:27:28.440: E/System(66): java.lang.SecurityException 
03-26 07:27:28.440: E/System(66): at android.os.BinderProxy.transact(Native Method) 
03-26 07:27:28.440: E/System(66): at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146) 
03-26 07:27:28.440: E/System(66): at android.os.ServiceManager.addService(ServiceManager.java:72) 
03-26 07:27:28.440: E/System(66): at com.android.server.ServerThread.run(SystemServer.java:176) 
03-26 07:27:28.440: E/AndroidRuntime(66): Crash logging skipped, no checkin service 
03-26 07:27:39.779: E/ActivityThread(120): Failed to find provider info for android.server.checkin 
03-26 07:27:41.341: E/ActivityThread(120): Failed to find provider info for android.server.checkin 
03-26 07:27:41.530: E/ActivityThread(120): Failed to find provider info for android.server.checkin 
03-26 07:27:42.060: E/ActivityThread(120): Failed to find provider info for android.server.checkin 
03-26 07:27:42.140: E/ActivityThread(120): Failed to find provider info for android.server.checkin 
03-26 07:27:49.890: E/PackageManager(66): Package com.lkv.mobile.apps.gps requires unavailable shared library com.google.android.maps; failing! 
03-26 07:27:50.331: E/AndroidRuntime(163): ERROR: thread attach failed 
+2

參考:http://stackoverflow.com/questions/2283398/shared-library-missing-in-android – Stephenmjm 2012-08-07 14:58:29

+0

@Stephenmjm是正確的,這是要走的路。 – santiagobasulto 2013-11-05 19:36:42

回答

10

檢查您的Manifest.xml。在我的情況是:

<uses-library android:name="com.google.android.maps" /> 

我必須刪除。

+0

如果您正在使用Maps V2,那麼您不需要com.google.android.maps – 2013-11-05 19:44:07

+0

我遇到同樣的問題。如果我修改清單,我無法測試我的地圖特徵。有沒有辦法在模擬器(AVD)上安裝谷歌地圖包? – mobibob 2014-01-17 16:43:38

+0

@mobibob我假設你正試圖實現Maps V2,而不是V1。然後它是Play服務框架的一部分。在模擬器上它應該沒有問題。你使用了什麼AVD? – 2014-01-17 16:47:12

1

在一個真正的設備上修復fixing missing shared library,在一些ROM上comp.google.android.map不存在。

download googleapps 
extract two files 
system/etc/permissions/com.google.android.maps.xml 
system/framework/com.google.android.maps.jar 
remount the /system filesystem rw (mount -o rw,remount /system) 
copy the files in 
do a chmod 644 on them 
reboot 

@Nys

0

礦所有學分調試製作仿真器,當我從「應用程序」元素移出用途庫標籤。

uses-library android:name=com.google.android.maps 

在釋放模式下它要求在「應用程序」裏面,不知道爲什麼。

相關問題