Could Not Find Class com.google.android.gms.maps.SupportMapFragment

馋奶兔 提交于 2019-11-29 18:01:47
  • 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:

  • 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.

Sasa Sekulic

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."

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

  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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!