Cannot resolve MapActivity class on Android

后端 未结 12 2490
刺人心
刺人心 2020-11-29 09:48

I have an application which has 11 different activities. One of these activities is an extension of MapActivity (it is a map for data visualization). To get to this activi

12条回答
  •  死守一世寂寞
    2020-11-29 10:42

    The problem is that your MapVis class is likely extending com.google.android.maps.MapActivity. For the system to be able to find this class you need to do two things:

    First make sure your project is including the Android maps.jar in your build path. From Eclipse find

    Project > Properties > Android
    

    Then select one of the "Google APIs" as appropriate for you app. You can confirm that maps.jar is on your build path by checking:

    Project > Properties > Java Build Path > Libraries > Expand "Google Apis"
    

    Second browse to your manifest file and make sure you have the uses-library snippet nested within the tags as follows:

    
    ...
       
          
          ...
       
    
    

    May the force be with you!

提交回复
热议问题