Google Maps API v2

Source: Internet
Author: User
Tags contact google

After successfully running Google map on AVD, another problem occurred in the actual project.

1. Why is an error occurring on a real machine when AVD runs normally on my mobile phone and only the grid does not display the map?

Two hundred degrees later, it may be because of the API key issue. During debug, the applied API key uses Debug. keystore, but after the release, the program runs on the real machine. You need to obtain a new keystore and then apply for an API key again. The problem still cannot be solved.

3. Use the re-applied API key to connect to the Development Mode for debugging and find that the logcat error is Authorization failure, that is, the API key applied for by Debug. keystore is also used for connecting to the real machine during debugging. Okay, so change it back. Re-Debug.

4. The error message of logcat is changed to "failed to load map. cocould not contact Google servers." I used Google to search for the error message this time... Finally, find the cause on the stackoverflow Q & A site. Add the following permissions:

 <uses-permissionandroid:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>

 

 

 

So far, it took me one night to find out the problem and record it.

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.