Eclipse ADT & Google APIs: Fixing “MapActivity cannot be resolved to a type”

After using the SDK Manager to download and install the Google APIs Add-On (see one can start to develop Android applications that uses the Google services like Google Maps.

After changing the parent class of your activity to MapActivity one has to select one of the Google APIs as “Android Built Target” (Right click on project > Properties > Android). Otherwise the class cannot be resolved and you will get the error:

MapActivity cannot be resolved to a type

The basic MapActivity class will look like this:

package com.package;

import android.os.Bundle;

public class MyMapActivity extends MapActivity {
  public void onCreate(Bundle savedInstanceState) {
  protected boolean isRouteDisplayed() {
    return false;

Leave a Reply

Your email address will not be published. Required fields are marked *