Join David Gassner for an in-depth discussion in this video Importing and linking the Google Play services library, part of Building Mobile Apps with Google Maps Android API v2.
The Google Maps Android API is a part of Google Play Services, services…that are only available on devices that have the Google Play APK or application.…To build your application, you need to go get…the classes that are a part of that APK.…And in the early part of this course, I…showed you how to download them in the SDK Manager.…I'll go back to SDK Manager…by going to Window > Android SDK Manager and scroll down to the…bottom of the list and show that I have Google Play services installed.…
Once you have them installed, you need to import them into your workspace.…I'll Close the SDK manager, and then, I'll do an import.…I'll select File > Import, and then, instead of using the…Java specific tools, I'll go to the Android category, and…I'll choose existing Android code into workspace and click Next.…I'll browse for the root directory and I'll start in…the folder that contains my ADT bundle, Eclipse and the SDK.…
I'll go to the SDK folder, to Extras, to Google.…And there's the Google Play services folder.…You need to import this file, the live project…
Note: An Android device with Android 3.0 (Honeycomb) or higher, and that has Google Play Store installed, is required to use the course exercises. (Kindle Fire and Nook devices do not qualify.) Finished mapping apps can be deployed on Android 2.2 (Froyo) or later.
- Setting up the developer tools
- Adding required permissions
- Getting a Google Maps API key
- Importing and linking the Google Play services
- Setting a map's initial state
- Geocoding an address
- Getting the current location programmatically
- Adding map markers
- Handling marker events
- Drawing lines, polygons, and circles
- Adding maps to existing apps
Skill Level Intermediate
Q: In the Chapter 2 movie "Checking the device for the Google Play services APK," when I create my first Google Maps app, the app crashes when I call the custom method servicesOK(). The error in LogCat starts with: "java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value." How do I fix this?