When I first working on with MapActivity, I got above error. I kept press Ctrl+Shift+O. However, the type just wouldn’t resolve. Finally I found the answer on the Internet. You need to change the build target to “Google API”
Right click on the project. Go to “Properties”. Change the “Build Target” from “Android 1.x to Google APIs 1.x”
Thanks for this post. I was going crazy trying to find why "MapActivity cannot be resolved to a type". After reading your post, I found the Google APIs for Android, installed them, and then set the target as per your screenshot, and all the compile errors went away.
ReplyDeleteThanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks !
ReplyDeleteHey all! I had the same issue even though I had started a new project using Google API right from the get-go. The fix was to make sure to import the com.google.android.maps.MapActivity class. So in the example, you should have something like this:
ReplyDeleteimport android.app.Activity;
import android.os.Bundle;
import com.google.android.maps.MapActivity;
That fixed it for me!
Hey thanks! I'm very new to android and java, and this helped me out immensly!
ReplyDeletethanks Very Much for your post,,,m really thanks so much
ReplyDeleteThank you so much. This worked. Why doesn't the ADT Plugin give some hints for stuff like this? Billions in profit, but not enough staff to make development a little less frustrating?
ReplyDeleteThank you so much.
ReplyDeleteThis info was too much helpful..
I do not have Google APIs under Project Build Target. Any idea what to do ?
ReplyDeleteintall them in SDK manager
DeleteYou probably haven't installed the Google APIs. Check out http://code.google.com/android/add-ons/google-apis/
ReplyDeleteI Love You Thaaaaaaaaaaaaaaaaaaaaaaaaaaaaaanks
ReplyDeleteThank you so much for your help!! This is so helpful! (:
ReplyDeletegr8!!! helpful
ReplyDeleteThe greatest THANKS!!!
ReplyDeleteThanks a tonnnnnnnn
ReplyDeleteHelped me too! Thanks!
ReplyDeletethank you...
ReplyDeleteThank you so much!!!!!!!!!!!!!!!! great........................
ReplyDeletepour moi non... les erreurs retse
ReplyDeleteGracias
ReplyDeleteThankyou so much for this important post.. :-)
ReplyDeleteThat's great yar! A bunch of thanks to dear
ReplyDeleteHey Thanx Man !!!
ReplyDeletethanks!! your my savior
ReplyDeleteGrand merci mon grand tu m'a sauvé la vie j’étais au point de mourir!
ReplyDeletemerci!merci!merci!merci!merci!merci!merci!merci!merci!merci!merci!merci!