title: MapView ClassCastException
body: <p>Here's the LogCat content :</p>
  
  <pre><code>02-25 15:57:42.481: E/AndroidRuntime(1327): FATAL EXCEPTION: main
  02-25 15:57:42.481: E/AndroidRuntime(1327): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.hs.hospitalfinder/com.hs.hospitalfinder.MainActivity}: android.view.InflateException: Binary XML file line #11: Error inflating class MapView
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at android.app.ActivityThread.access$600(ActivityThread.java:141)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at android.os.Handler.dispatchMessage(Handler.java:99)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at android.os.Looper.loop(Looper.java:137)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at android.app.ActivityThread.main(ActivityThread.java:5039)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at java.lang.reflect.Method.invokeNative(Native Method)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at java.lang.reflect.Method.invoke(Method.java:511)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at dalvik.system.NativeStart.main(Native Method)
  02-25 15:57:42.481: E/AndroidRuntime(1327): Caused by: android.view.InflateException: Binary XML file line #11: Error inflating class MapView
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:698)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at android.app.Activity.setContentView(Activity.java:1881)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at com.hs.hospitalfinder.MainActivity.onCreate(MainActivity.java:18)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at android.app.Activity.performCreate(Activity.java:5104)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     ... 11 more
  02-25 15:57:42.481: E/AndroidRuntime(1327): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.MapView" on path: /system/framework/com.google.android.maps.jar:/data/app/com.hs.hospitalfinder-1.apk
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at android.view.LayoutInflater.createView(LayoutInflater.java:552)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at android.view.LayoutInflater.onCreateView(LayoutInflater.java:643)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
  02-25 15:57:42.481: E/AndroidRuntime(1327):     ... 22 more
  </code></pre>
  
  <p>The suspected culprit is:</p>
  
  <p><code>m = (MapView)findViewById(R.id.mapView);</code></p>
  
  <p>where <code>m</code> is:</p>
  
  <p><code>private MapView m;</code></p>
  
  <p>I don't understand where am I going wrong. Please guide.</p>