Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Google maps

I can't get the mapView to work for android. I've followed every tutorial on the web but it doesn't seem to work. When I install the google play service it has errors so if i reference that library my app will have errors. Is there something I need to do with the google library?

3 Answers

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

What kind of problem are you experiencing, exactly? Errors in Eclipse? A crash when it loads? A blank mapView? One thing to check (which you probably already checked via a tutorial): are you using the Google APIs for your emulator as opposed to the regular Android APIs? i.e. When creating an emulator, make sure you select one of the "Google" APIs as opposed to something like "Android 4.2.2 - API Level 17". If you don't have any Google APIs as an option then you will need to download them using the Android SDK Manager.

Side note: This is something I hope to cover soon!

First off thank you for all your help and those video tutorials are great. I would of been lost if it wasn't for those videos and I know Java pretty well.

Here's the steps I take to try and make the google maps work:

  1. Update my sdk and install google play services
  2. I import the google_play_services into my workspace
  3. When I do that, the google_play_services project has errors. It also creates the Main_Activity Project which I understand is the samples of how to work with google maps.
  4. I reference the library in my app but I know it's not going to work if the google_play_services project has errors

I don't see a "Google" choice as a AVD type I get compiler errors so I can't even run my app to see what's wrong

I'm looking forward to any new videos that you guys come up with. I'm an iphone app developer trying to add android to my toolkit

Ben Jakuben
Ben Jakuben
Treehouse Teacher

Hmmm...2 things:

  1. What compiler errors are you getting? Either paste them in here or zip up your project and email it to help@teamtreehouse.com. I can't promise a quick turnaround on a non-Treehouse project, but I'd be happy to take a look when I have a few minutes.

  2. Not sure where you're trying to run it, but it looks like you need to jump through some hoops to use Google Play Services on the emulator. You may need to test on a phone or tablet or follow instructions like these: http://stackoverflow.com/questions/14536595/how-to-download-google-play-services-in-a-android-emulator

Ok. I just sent it to you. Kept trying to figure out how to do it but had no luck. I finally got the Google AVD option to show up but my error isn't a runtime error. It's something with that google project that I download that my ADT doesn't like.

Ben Jakuben
Ben Jakuben
Treehouse Teacher

Just wanted to let you know that I'm working under a deadline for something and can't take a look at any outside support projects like this for the next few days, at least. I'll try to get back to you when I can but just didn't want to leave you hanging in here! Best of luck in the mean time, and feel free to keep posting questions about this in the forum or on StackOverflow.