Skip to content Skip to sidebar Skip to footer

Could Not Find Class Com.google.android.gms.maps.supportmapfragment

So I'm working on an app that uses Google Maps v2 API to display a map overlay. I know this question has been asked before but I've tried everything. I am testing my app using a N

Solution 1:

  • I do not see you mention adding the Android support library android-support-v4.jar. You need to make sure Eclipse is properly including it for com.google.android.gms.maps.SupportMapFragment to work:

    Eclipse Android project included libraries path

  • Another potential issue is mismatch of play services library in your app and the play services verion on your nexus 5 device. If you downloaded the latest library from SDK manager, it may be higher version than the one on your device. I am guessing your play services version on device is 5.0.89, you can check on device Settings -> Apps -> Downloaded -> Google Play Services. Try using older version of the library if that's the case.

Finding Google Play Services version

Solution 2:

Have you tried this suggestion: Unable instantiate android.gms.maps.MapFragment?

"Try right-clicking on your project in Eclipse, select Android Tools > Add Support Library. In my case it was a stale version taken from ActionBarSherlock."

Solution 3:

When importing the Google play service-lib, did you add it into the work space. try adding it in to the workspace

Solution 4:

  1. Have you ever make sure that the google-play-services_lib is in the same directory with your current project?
  2. Make sure the "android-support-v4.jar" is added.
  3. Did not see you show the layout file. Make sure that you add " element. enter image description here

Post a Comment for "Could Not Find Class Com.google.android.gms.maps.supportmapfragment"