Android 中的 INSTALL_FAILED_MISSING_SHARED_LIBRARY 错误
当我尝试运行使用 Google API 的 Android 应用程序时,出现以下错误
[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] 启动已取消!
谁能帮我解决这个错误?
When I am trying to run an android application which uses Google API I get the following error
[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!
Can anyone help me solve this error?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(15)
转到:
<块引用>
项目>属性>Android>
选择:Google API Android 4.0.3
转到
单击图标:
<块引用>
Android 虚拟设备管理器>编辑> Tabget>Google APIs APIsLevel15 中的选择框
并选择内置:是WQVGA400> 编辑AVD> 开始
Goto:
Click Icon:
//检查您的清单
//这是在错误添加导致问题的新活动时为我添加的。
//Check your manifest
//This was added for me while adding a new activity by mistake which was causing the problem.
安装到实际设备时我遇到了同样的错误。 可以在以下站点找到将缺少的库加载到设备的更多信息和解决方案:
修复 INSTALL_FAILED_MISSING_SHARED_LIBRARY 错误
要正确设置此错误,需要将 2 个关键文件复制到系统中:
com.google.android.maps.xml
com.google.android.maps.jar
这些文件位于以下任意 Google 应用程序包中:
解压这些文件后,你想将这些文件复制到你的系统中,就像这样:
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
To set this up correctly, there are 2 key files that need to be copied to the system:
com.google.android.maps.xml
com.google.android.maps.jar
These files are located in the any of these google app packs:
After unzipping any of these files, you want to copy the files to your system, like-ah-so:
发生这种情况的原因如下 -
代码删除实现或添加它们可以消除此错误。
您可以删除 android 清单文件中的“uses”代码。
示例:
这浪费了我1个小时,因为我错误地添加了一类可穿戴类型,当然,我使用refractor安全地删除了它,但滴滴没有对清单文件进行更改。
我在 java 项目中使用了 firebase crashlytics 代码,但我错误地在 buld.gradle 中删除了它。
如下:
实施“com.google.firebase:firebase-crashlytics:17.1.1”
解决方案主要位于 BUILD>GRADLE 或 AndroidManifest.xml 中。
This may happen due to the following reasons -
So by removing the implementation or adding them can remove this error.
You can remove the "uses" code in the android manifest file.
Examples:
this wasted my 1 hour, cause I mistakenly added a class of wearable type, of course, I safe deleted that using refractor but it Didi not made changes to manifest file.
I used the firebase crashlytics code in my java project but I mistakenly deleted that in buld.gradle.
Here below:
implementation 'com.google.firebase:firebase-crashlytics:17.1.1'
The solution is in either BUILD>GRADLE or in AndroidManifest.xml, mostly.
我正在开发一个版本 2.2 的应用程序,API 版本将在第 8 版...出现相同的错误,该错误告诉我这是谷歌地图 API,我们所做的就是更改我的项目 API 2.2 的 ADV 以及API。
这对我有用并找到了所需的库 API。
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.
This worked for me and found the library API needed.
当我使用 Android Mobile 运行 Datalogic 应用程序时,收到错误 INSTALL_FAILED_MISSING_SHARED_LIBRARY。
清单文件有
所以,我使用 android:required="true" 的 false 值解决了错误。
当您收到此类错误时,这就是您的设备与执行。 需要检查您正在使用什么类型的应用程序 SDK 以及设备要求是什么。
I received an error INSTALL_FAILED_MISSING_SHARED_LIBRARY when I run the Datalogic Application using Android Mobile.
The Manifest file has
So, I solved the error using false value of android:required="true"
When you get this type of error that's why your device is not compatible with the execution. Need to check what type of app SDK you are using and what is the device requirement.
当您尝试在模拟器上运行应用程序时会发生这种情况。 模拟器没有共享的谷歌地图库。
This happens when you are trying to run application on emulator. Emulator does not have shared google maps library.
当我尝试这些解决方案时。
我解决了:
创建一个新的虚拟设备(选择 Google APIs(Google Inc)-API Level 15 替换 android 4.0.3-APILevel 15 )
然后再次运行。 它解决了。
我认为这只是因为设备没有 google apis~
IDE:android-studio
操作系统:ubuntu 12.04
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.
I think it's just because the device have no google apis~
IDE:android-studio
OS:ubuntu 12.04
通常,这意味着应用程序安装/调试在不支持某些所需库(可能与Android版本或硬件有关)的设备(包括虚拟设备)上。
检查
manifest
中的元素
以确定设备是否支持所有库。 就我而言,它是 EDMK(Zebra 条码扫描仪库)。注意:Google Play 使用应用清单中声明的
元素来过滤不符合其库要求的设备中的应用。选项 a)
如果意外添加了库(您的应用中未使用其特定类),请删除元素
。选项 b)
如果库是可选的,请将
android:required="false"
添加到
中。 如果某些部分需要此库,您可能需要在代码中添加验证。选项 c)
如果需要该库,请使用另一台设备或创建支持该库的虚拟设备 (AVD)。
Usually, it means that the app is installed/debugged on the device (including virtual device) that does not support some required library (it may relate to Android version or hardware).
Check elements
<uses-library>
in yourmanifest
whether all libraries are supported on the device. In my case, it was EDMK (library for Zebra barcode scanners).Note: Google Play uses the
<uses-library>
elements declared in your app manifest to filter your app from devices that don't meet its library requirements.Option a)
If the library was added accidentally (its specific classes are not used in your app), remove the element
<uses-library>
.Option b)
If the library is optional, add
android:required="false"
into<uses-library>
. You may need to add validations in your code if some part requires this library.Option c)
If the library is required, use another device or create a virtual one (AVD) that supports the library.
而不是删除
在许可的情况下,只需设置
instead of removing the
in permission, just set the
解决此问题的另一种方法是安装所需的缺少的库。
您可以下载库并查看如何安装
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.
要解决 Android 版 Google 地图的
INSTALL_FAILED_MISSING_SHARED_LIBRARY
错误:安装 Google 地图 API。 这可以在 Eclipse Windows/Android SDK 和 AVD Manager 中完成 -> 可用套餐 -> 第三方附加组件 -> 谷歌公司 -> Google Inc. 提供的 Google API、Android API X
从命令行创建新的 AVD。 这可以通过列出来完成
目标(android列表目标),然后android创建avd -n
new_avd_api_233 -t "Google Inc.:Google APIs:X"
然后在 Eclipse Windows/Android 中创建 AVD (Android Virtual Device)
SDK和AVD管理器-> 新... -> (名称:new_avd_X,目标:Google
API (Google Inc.) - API 级别 X)
重要
:您必须使用 Target 作为 Google API (Google Inc.) 创建 AVD,否则将再次失败。在 Eclipse File/New/Android Project 中创建 Android 项目并
选择 Google APIs Build Target。
添加
<应用程序> 之间
作为 Android 应用程序运行项目。
如果错误仍然存在,那么您仍然遇到问题,如果它有效,那么这个错误将永远在您身后。
To get past
INSTALL_FAILED_MISSING_SHARED_LIBRARY
error with Google Maps for Android: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
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"
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.Create Android Project in Eclipse File/New/Android Project and
select Google APIs Build Target.
add <uses-library android:name="com.google.android.maps" />
between <application> </application> tags.
Run Project as Android Application.
If error persists, then you still have problems, if it works, then this error is forever behind you.
如果 required 为真,也许你需要改变
if required is true, maybe you need to change
就我而言,应用程序默认为可穿戴目标设备。
我在清单中删除了对可穿戴设备的引用,问题就解决了。
In my case, it was that the app had defaulted to a Wearable target device.
I removed the reference to Wearable in my Manifest, and the problem was solved.
<uses-library android:name="com.google.android.wearable" android:required="true" />
您可以在 Google API 模拟器上运行来解决它。
要在 Google API 模拟器上运行,请打开您的 Android SDK & AVD管理器> 可用套餐> 谷歌存储库> 选择您需要测试的 Google API 级别。
安装后,将它们添加为虚拟设备并运行。
You can solve it be running on Google API emulator.
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.
After installing them, add them as virtual device and run.