title: How to avoid Class not found exception in android?
body: <p>I am developing a sample map application using map API V-2. This app runs properly on one of device having jelly been 4.3 but, when I test this app on another device having Gingerbread 2.3.5, the app crashes and shows exception below.</p>
  
  <pre><code>android.view.InflateException: Binary XML file line#2: Error inflating class fragment.
  </code></pre>
  
  <p>and</p>
  
  <pre><code>ClassNotFoundException: android.view.fragment in loader dalvik..............
  </code></pre>
  
  <p>Please guide me that how to run the successfully on  Gingerbread devices. Thanks in advance.</p>
  
  <p>Here is my xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;fragment xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/map"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:name="com.google.android.gms.maps.MapFragment"/&gt;
  </code></pre>
  
  <p>Here is my java file:</p>
  
  <pre><code>public class MainActivity extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
      }
  }
  </code></pre>