Android 中的 INSTALL_FAILED_MISSING_SHARED_LIBRARY 错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1113088/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 02:43:01  来源:igfitidea点击:

INSTALL_FAILED_MISSING_SHARED_LIBRARY error in Android

androidgoogle-mapsshared-librariesfailed-installation

提问by Brijesh Patel

When I am trying to run an android application which uses Google API I get the following error

当我尝试运行使用 Google API 的 android 应用程序时,出现以下错误

[2009-07-11 11:46:43 - FirstMapView] Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY
[2009-07-11 11:46:43 - FirstMapView] Please check logcat output for more details.
[2009-07-11 11:46:44 - FirstMapView] Launch canceled!

[2009-07-11 11:46:43 - FirstMapView] 安装错误:INSTALL_FAILED_MISSING_SHARED_LIBRARY
[2009-07-11 11:46:43 - FirstMapView] 请检查 logcat 输出以获取更多详细信息。
[2009-07-11 11:46:44 - FirstMapView] 发布取消!

Can anyone help me solve this error?

谁能帮我解决这个错误?

回答by Mirco Mage

To get past INSTALL_FAILED_MISSING_SHARED_LIBRARYerror with Google Maps for Android:

要解决INSTALL_FAILED_MISSING_SHARED_LIBRARYAndroid 版 Google 地图的错误:

  1. Install Google map APIs. This can be done in Eclipse Windows/Android SDK and AVD Manager -> Available Packages -> Third Party Add-ons -> Google Inc. -> Google APIs by Google Inc., Android API X

  2. From command line create new AVD. This can be done by listing targets (android list targets), then android create avd -n new_avd_api_233 -t "Google Inc.:Google APIs:X"

  3. Then create AVD (Android Virtual Device) in Eclipse Windows/Android SDK and AVD Manager -> New... -> (Name: new_avd_X, Target: Google APIs (Google Inc.) - API Level X)

    IMPORTANT: You must create your AVD with Target as Google APIs (Google Inc.) otherwise it will again failed.

  4. Create Android Project in Eclipse File/New/Android Project and select Google APIs Build Target.

  5. add <uses-library android:name="com.google.android.maps" /> between <application> </application> tags.

  6. Run Project as Android Application.

  1. 安装 Google 地图 API。这可以在 Eclipse Windows/Android SDK 和 AVD Manager -> Available Packages -> Third Party Add-ons -> Google Inc. -> Google APIs by Google Inc. 中完成,Android API X

  2. 从命令行创建新的 AVD。这可以通过列出目标(android 列表目标)来完成,然后 android create avd -n new_avd_api_233 -t "Google Inc.:Google APIs:X"

  3. 然后在 Eclipse Windows/Android SDK 和 AVD Manager 中创建 AVD (Android Virtual Device) -> New... -> (Name: new_avd_X, Target: Google APIs (Google Inc.) - API Level X)

    IMPORTANT:您必须使用 Target 作为 Google API (Google Inc.) 创建 AVD,否则它将再次失败。

  4. 在 Eclipse File/New/Android Project 中创建 Android Project 并选择 Google APIs Build Target。

  5. 在 <application> </application> 标签之间添加 <uses-library android:name="com.google.android.maps" /> 。

  6. 将项目作为 Android 应用程序运行。

If error persists, then you still have problems, if it works, then this error is forever behind you.

如果错误仍然存​​在,那么您仍然有问题,如果它有效,那么此错误将永远在您身后。

回答by semih

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

if required is true, maybe you need to change

如果需要是真的,也许你需要改变

回答by samwize

You can solve it be running on Google API emulator.

您可以解决它在 Google API 模拟器上运行的问题。

To run on Google API emulator, open your Android SDK & AVD Manager > Available packages > Google Repos > select those Google API levels that you need to test on.

要在 Google API 模拟器上运行,请打开您的 Android SDK & AVD Manager > Available packages > Google Repos > 选择您需要测试的那些 Google API 级别。

After installing them, add them as virtual device and run.

安装它们后,将它们添加为虚拟设备并运行。

回答by Mr Douangkeo

  1. Open eclipse
  2. Goto:

    project>Properties>Android> select: google APIs Android 4.0.3

  3. Click Icon:

    Android Virtual Device Manager>Edit> Slect box in Tabget>Google APIs APIsLevel15
    and select Built-in: is WQVGA400 > Edit AVD > Start

  1. 打开日食
  2. 去:

    项目>属性>Android>选择:google APIs Android 4.0.3

  3. 点击图标:

    Android Virtual Device Manager>Edit> 在 Tabget>Google APIs APIsLevel15 中
    选择框并选择 Built-in: is WQVGA400 > Edit AVD > Start

回答by todd

I got this same error when installing to an actual device. More information and a solution to loading the missing libraries to the device can be found at the following site:

安装到实际设备时,我遇到了同样的错误。可以在以下站点找到更多信息和将丢失的库加载到设备的解决方案:

Fixing the INSTALL_FAILED_MISSING_SHARED_LIBRARY Error

修复 INSTALL_FAILED_MISSING_SHARED_LIBRARY 错误

To set this up correctly, there are 2 key files that need to be copied to the system:

要正确设置,需要将 2 个关键文件复制到系统中:

com.google.android.maps.xml

com.google.android.maps.xml

com.google.android.maps.jar

com.google.android.maps.jar

These files are located in the any of these google app packs:

这些文件位于以下任何 google 应用程序包中:

http://android.d3xt3...0120-signed.zip

http://goo-inside.me...0120-signed.zip

http://android.local...0120-signed.zip

These links no longer work, but you can find the files in the android sdk if you have Google Maps API v1

这些链接不再有效,但如果您有 Google Maps API v1,您可以在 android sdk 中找到这些文件

After unzipping any of these files, you want to copy the files to your system, like-ah-so:

解压缩这些文件中的任何一个后,您想将这些文件复制到您的系统中,例如-ah-so:

adb remount

adb push system/etc/permissions/com.google.android.maps.xml /system/etc/permissions

adb push system/framework/com.google.android.maps.jar /system/framework

adb reboot

回答by José De la O

I am developing an app to version 2.2, API version would in the 8th ... had the same error and the error told me it was to google maps API, all we did was change my ADV for my project API 2.2 and also for the API.

我正在开发一个版本为 2.2 的应用程序,API 版本将在第 8 版......有同样的错误,错误告诉我这是谷歌地图 API,我们所做的只是更改了我的项目 API 2.2 的 ADV 以及应用程序接口。

This worked for me and found the library API needed.

这对我有用,并找到了所需的库 API。

回答by Alps1992

When I try these solutions.
I solved with:
create a new virtual device( select Google APIs(Google Inc)-API Level 15 replace android 4.0.3-APILevel 15 ) then run again. It solved.

当我尝试这些解决方案时。
我解决了:
创建一个新的虚拟设备(选择 Google APIs(Google Inc)-API Level 15 替换 android 4.0.3-APILevel 15)然后再次运行。它解决了。

I think it's just because the device have no google apis~

我觉得只是因为设备没有google apis~

IDE:android-studio OS:ubuntu 12.04

IDE:android-studio 操作系统:ubuntu 12.04

回答by Sergeenho

Another way to solve this problem is to install the missing libs that you need.

解决此问题的另一种方法是安装所需的缺失库。

You can download the libs and see how to install here.

您可以在此处下载库并查看如何安装。

回答by kreker

This happens when you are trying to run application on emulator. Emulator does not have shared google maps library.

当您尝试在模拟器上运行应用程序时会发生这种情况。模拟器没有共享的谷歌地图库。