Record Android Baidu Map API use problems encountered

Source: Internet
Author: User
Tags sha1

Tossing for two or three nights, finally realized the Baidu map on the android side of the display:

Here the main summary of the Baidu map API in the win 10 under the use of Android Studio encountered problems:

1. View SHA1 values for native Android or apps

SHA1 value is used to create apps using Baidu Developer Console ~ ~

My computer is the WIN10 system, the installation of Android Studio also did not configure the JDK environment variable these, so in view SHA1 worth the time to encounter some problems, Baidu officially provided by the CMD Console command to view, "keytool-list-v- KeyStore Debug.keystore ", Address: Http://developer.baidu.com/map/index.php?title=androidsdk/guide/key. Because I didn't configure the environment variables for the JDK, there was a problem with the Invoke command:

' Keytool ' isn't recognized as an internal or external command,
Operable program or batch file.

Through the search, found the solution: C:\Program Files\java\jdk1.6.0_25\bin, go here to execute the command.

Address: http://blog.csdn.net/xinma/article/details/6988893, grey often thanks

Again, if we want to confirm the SHA1 value when we build the APK, check the SHA1 of the APK is worth the method:

The generated apk file suffix name to zip, then unzip, get the Meta-inf folder cert.rsa file, copy the file to the above Jdk\bin directory, open the command console in the Jdk\bin directory, hold down SHIFT + right mouse button, click Open Command Window here, then enter "Keytool-printcert-file CERT." RSA "To see the SHA1 and MD5 values.

Reference Address: http://tieba.baidu.com/p/4069492658

http://tieba.baidu.com/p/4069492658

Timberland More ~ ~

Then remember to delete the Cert.rsa in the Jdk\bin directory.

2. Implement Baidu map HelloWorld, the program has been stopped running, error report:

Java.lang.UnsatisfiedLinkError:
Native Method Not found:com.baidu.platform.comjni.map.commonmemcache.JNICommonMemCache.Create: ()

Because Android development is not very familiar, so see these errors do not understand, after the search was originally so file did not load. Baidu Map API When the download is a part of C or C + + write so file, do not know if this is the NDK development. We need to add the Jnilibs folder in the main directory of the project, and then put the API's so file directory in, I put it all in. Then Clean,rebuild, you can run, but you will encounter the following problems.

3. Can only display grid cannot load map: 230 error APP SCODE checksum failed

Search on the Internet a lot, there is said because the SHA1 value does not match, but I look at it is not wrong; Then there is the error report in the official forum:

Http://bbs.lbsyun.baidu.com/forum.php?mod=viewthread&tid=80640&page=24&extra= #pid200588

I also submitted the AK value and error in the forum, it is strange that just submitted 10 minutes, my map will be able to correctly display the ~~!

Do not know is Baidu solve it or because of other reasons

In short, through this small test case, more in-depth understanding of the Baidu Map API, followed by more familiar with the Android development involved in some of the basic operations.

Hope tomorrow will be a sunny day ~ ~

Record Android Baidu Map API use problems encountered

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.