Android map service development INSTALL_FAILED_MISSING_SHARED_LIBRARY error Solution

Source: Internet
Author: User

Android map service development INSTALL_FAILED_MISSING_SHARED_LIBRARY error Solution

 

In the development of the map service, such errors are generally solved in the following two situations: (most of the forums are the answers to the first situation, but the second situation

The solution to the Forum is basically invalid ).

Scenario 1: If you use a simulator to debug a program

First, check AndroidManifest. xml to ensure that <uses-library android: name = "com. google. android. maps"/> has been written.
Secondly, make sure that the TargetName selected by Build Target is not Android but Google APIs corresponding to its version.
Create a new simulator, and select Google APIs for target.
In this way, the problem is basically solved. You can run on the simulator normally. If the map cannot be displayed after running, it is a realistic gray table. So your

Android: Incorrect apiKey. Re-register the apiKey (refer to the api or go to the Forum for details ).

 

Case 2: A similar error occurs when the simulator runs normally and the real machine debugs.
That's because the file com. google. android. maps. jar is missing from the system/framework in your real machine.
Solution:

1. Enter the shell of your device
Adb-d shell (remember the parameter-d)
2. Grant system Read and Write Permissions
Different machines here are slightly different. You can see the situation that suits your machine as follows:
Mount-o rw-t yaffs2/dev/block/mtdblock3/system
Or
Mount-o remount, rw/dev/root/
For my machines:
My system uses cm. To do this:
Mount-o remount, rw/dev/block/mtdblock3/system

3. Export com. google. android. maps. jar from the system/framework folder of emulator, which can be exported directly through ddms or through adb

Command export:
Adb-d push com. google. android. maps. jar/system/framework/

Or

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

Adb push com. google. android. gtalkservice. jar/system/framework/com. google. android. gtalkservice. jar
4. Add permissions to the file:
Here are two methods:
(1) extract the/etc/permissions/platform. xml file from the real machine and edit it:

<Permissions>
</Permissions>
Add at the end:
<Library name = "com. google. android. maps" file = "/system/framework/com. google. android. maps. jar"/>

Then, push the platform. xml file back to the/etc/permissions folder of the real machine.
(2) This can also be done for Versions later than 2.2: You can directly pull your emulator

/Etc/permissions/com. google. android. maps. xml and push it to your real machine's/etc/permissions

5. Restart your mobile phone. Now you can debug your android service. If it doesn't work, restart it again.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.