Book Image

Learning Android Google Maps

Book Image

Learning Android Google Maps

Overview of this book

This book helps you to overcome the most common problems faced by users and helps you create a successful map application without any hassle. The book starts with a brief description of how to set up an environment and obtain an API key to create your map application. This book will teach you about adding markers, overlays, and information windows to the map in detail. You will then dive deep into customizing various types of maps and working with location data and Google Street view. By the end of this book, you will be able to create succinct map applications in Android using Google maps efficiently.
Table of Contents (18 chapters)
Learning Android Google Maps
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Common problems and solutions


Common problems and their solutions are as follows:

  • java.lang.RuntimeException: The API key is not found—Logcat.

    Your application will crash before opening. This is caused because the API key is not found in manifest.

    To fix this, add the API key to AndroidManifest.xml

  • Authorization failure—Logcat: Your application will display an empty map on opening. This is caused because you have entered an invalid API key. You may have missed some strings in the key.

    To fix this, enter the API key without missing anything

  • This application will not run unless you update Google Play services: This error is caused because you are using a lower version of Google play services than the version you used in your application.

    If you are using a physical device, you can fix this error by updating the Google Play services version. If you are using an emulator with the Google API, the only way to update is from the SDK Manager.