I cant import MapView for android project
public class ActivityGoogleMaps extends MapActivity {// map view shows as an error
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
I 开发者_如何学运维try to import this: import com.google.android.maps.MapActivity;
but when i type com. - google doesnt appear..
1- Go to Project Properties 2- From android tab, select Google API for your target platform (for 2.2, select Google APIs-Platform 2.2 and things like that)
I think this can solve the problem
you will have to add map.jar to libs. though it is automatically added when we extends MapActivity.
精彩评论