启动Android应用程序时出错

时间:2012-12-26 06:34:36

标签: java android

  

可能重复:
  Android Maps: Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY

我正在处理Google地图应用程序,我的代码完美无误;但是当我开始运行它时,我的控制台出现错误:

 [2012-12-26 11:43:44 - MapsActivity] Installing MapsActivity.apk...
 [2012-12-26 11:43:45 - MapsActivity] Installationerror:INSTALL_FAILED_MISSING_SHARED_LIBRARY
 [2012-12-26 11:43:45 - MapsActivity] Please check logcat output for more details.
 [2012-12-26 11:43:45 - MapsActivity] Launch canceled!

这是我的LogCat

  12-26 11:41:30.444: D/AndroidRuntime(263): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<

  12-26 11:41:30.444: D/AndroidRuntime(263): CheckJNI is ON

  12-26 11:41:30.553: D/AndroidRuntime(263): --- registering native functions ---

  12-26 11:41:31.103: D/dalvikvm(215): GC_EXPLICIT freed 403 objects / 23512 bytes in 51ms

  12-26 11:41:31.124: D/PackageParser(58): Scanning package: /data/app/vmdl51455.tmp

  12-26 11:41:31.183: D/PackageManager(58): Scanning package com.example.google

  12-26 11:41:31.183: E/PackageManager(58): Package com.example.google requires unavailable    shared library com.google.android.maps; failing!

  12-26 11:41:31.183: W/PackageManager(58): Package couldn't be installed in /data/app/com.example.google-1.apk

  12-26 11:41:31.274: D/dalvikvm(58): GC_EXPLICIT freed 5947 objects / 302928 bytes in 78ms

  12-26 11:41:31.324: D/AndroidRuntime(263): Shutting down VM

  12-26 11:41:31.334: D/dalvikvm(263): Debugger has detached; object registry had 1 entries

  12-26 11:41:31.344: I/AndroidRuntime(263): NOTE: attach of thread 'Binder Thread #3' failed

请建议我!!

1 个答案:

答案 0 :(得分:8)

创建将与Google Apis一起运行的模拟器。您创建了一个不支持Maps的模拟器,因此它会抛出该错误。

转到AVD Manager,选择当前的模拟器,然后单击编辑按钮。

然后选择Target作为任何版本的Google API并保存。重新启动模拟器并运行应用程序,这次您没有收到此类错误。

如果没有,那么您还没有完全更新Android SDK。请先这样做