i was trying to learn this tutorial. Using Google Maps in Android- http://mobiforge.com/developing/story/using-google-maps-android
The first code that I did is :
package net.learn2develop.GoogleMaps;
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;
}
}
Im getting a lot of error such as:
1) import.com.google cannot be resolved. 2) MapActivity cannot be resolved to a type.
Please help me. Thanks
OK. I FOUND THE SOLUTION IN Mapview in MapActivity Class not found
You are using the old/deprecated API which cannot be used now . You Have to use the Google Maps V2 Api for development. For this you need
Please Search the SO forum before posting a question there are a lot of solved Questions regarding the Same Issue
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.