例から同じことをしますが、Eclipseはエラーを返します。コードは次のとおりです。
package hello.google.map;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;
import android.os.Bundle;
public class MapsActivity extends MapActivity
{
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
@Override
protected boolean isRouteDisplayed() {
return false;
}
}
エラーは次のとおりです。
*
Description Resource Path Location Type
MapActivity cannot be resolved to a type HelloGoogleMapsActivity.java /HelloGoogleMaps/src/hello/google/map line 7 Java Problem
MapActivity cannot be resolved to a type HelloGoogleMapsActivity.java /HelloGoogleMaps/src/hello/google/map line 13 Java Problem
The import com.google cannot be resolved HelloGoogleMapsActivity.java /HelloGoogleMaps/src/hello/google/map line 3 Java Problem
The import com.google cannot be resolved HelloGoogleMapsActivity.java /HelloGoogleMaps/src/hello/google/map line 4 Java Problem
The method isRouteDisplayed() of type MapsActivity must override a superclass method HelloGoogleMapsActivity.java /HelloGoogleMaps/src/hello/google/map line 18 Java Problem
The method onCreate(Bundle) of type MapsActivity must override a superclass method HelloGoogleMapsActivity.java /HelloGoogleMaps/src/hello/google/map line 11 Java Problem
The method setContentView(int) is undefined for the type MapsActivity HelloGoogleMapsActivity.java /HelloGoogleMaps/src/hello/google/map line 14 Java Problem
The public type MapsActivity must be defined in its own file HelloGoogleMapsActivity.java /HelloGoogleMaps/src/hello/google/map line 7 Java Problem*
なんで?私は何を間違えますか?