1

I am using MotoDev Studio for Android Development and I am trying to Extend my Activity from MapActivity. But MotoDev does not Allow me to do this.

Can any One Tell me why this is so? On the other hand in Eclipse this is possible for me using Google Api. Plz Help me out.

salman khalid
  • 4,884
  • 4
  • 27
  • 33

2 Answers2

2

I don't use MotoDev, so I can only guess what the problem might be:

MapActivity is not a part of the Android SDK - it's a part of an external library: http://code.google.com/android/add-ons/google-apis/maps-overview.html

You should include this library in your project.

Most probably the official SDK & plugin does that automatically, while MotoDev does not.

Peter Knego
  • 79,991
  • 11
  • 123
  • 154
1

MOTODEV Studio doesn't prevent you from extending classes. It's just Eclipse + ADT and some other plugins that we created. I would advise following the direction that @PeterKnego mentioned. Just add the external library in MOTODEV Studio just as you would in Eclipse, using "Properties->Java Build Path".

Eric Cloninger
  • 2,260
  • 2
  • 21
  • 26
  • Thanks for your Answer. But Can you plz tell me how to install Google Inc. Api in Motodev because it does not give me any option to download that in SDK Manager. Due to this I am unable to make any Activity which includes Maps nor it allows me to extend my class from MapActivity. – salman khalid Feb 17 '12 at 05:51
  • You don't have to do anything special in MOTODEV Studio. Use the SDK Manager that is in Studio or the standalone tool in the SDK folder. Find the Google APIs that are the same as the Android API level you are targeting for you app. In the properties for your project, choose that Google APIs instead of Android. At that point, you can subclass MapActivity, assuming to make the required overrides. – Eric Cloninger Feb 17 '12 at 07:36