0

I have the following activity in my app that sets a geo location on a map fragment but when I click the activity in my testing it crashes with the following errors:

http://pastebin.com/6QhdL7z9

I looked through the errors but I can't make sense of why it is crashing as its referring to main as one of the reasons.

This is where I'm calling the code in the onCreate() for reference:

protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_map_gmit);
        /*map = (MapView)findViewById(R.id.map);
        map.setBuiltInZoomControls(true);*/

        //code to add a map marker at GMIT geographic location


        GoogleMap mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();
        mMap.addMarker(new MarkerOptions()
                .position(new LatLng(53.271900177, -9.04889965057))
                .title("GMIT Galway Location"));;


    }
Brian Var
  • 6,029
  • 25
  • 114
  • 212

1 Answers1

1

Android Studio or Eclipse?

Did you try searching on SO? ;) com.google.android.maps.MapView ClassNotFoundException Android - Google Maps API v2 - NoClassDefFoundError

Sounds like you did not export the library in your project.....

Community
  • 1
  • 1
DieselPower
  • 738
  • 2
  • 6
  • 22