title: Error: android.view.InflateException: Binary XML file line #9: Error inflating class fragment
body: <p>i have create an <strong>Activity</strong> with 2 seprat <strong>Fragments</strong>. In the <em>Run Time</em> the error are these:</p>
  
  <p>Here is the code:</p>
  
   
  
  <pre><code>&lt;LinearLayout
       xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="horizontal"&gt;
  
      &lt;fragment    
          android:name="com.example.lesson1.Fragment1"
          android:id="@+id/activity_fragment1"
          android:layout_weight="1"
          android:layout_width="0px"
          android:layout_height="match_parent"
       /&gt;
  
      &lt;fragment 
          android:name="com.example.lesson1.Fragment2"
          android:id="@+id/activity_fragment2"
          android:layout_weight="1"
          android:layout_width="0px"
          android:layout_height="match_parent"
       /&gt;
  
  
  &lt;/LinearLayout&gt;
  
  public class Myfragments extends Activity
  {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) 
      {
  
          super.onCreate(savedInstanceState);
  
          setContentView(R.layout.activity_myfragments);
  
      }
  }
  </code></pre>
  
  <p>The errors are :</p>
  
  <pre><code>03-26 11:26:27.808: E/Trace(5610): error opening trace file: No such file or directory (2)
  03-26 11:26:31.780: E/AndroidRuntime(5610): FATAL EXCEPTION: main
  03-26 11:26:31.780: E/AndroidRuntime(5610): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.lesson1/com.example.lesson1.Myfragments}: android.view.InflateException: Binary XML file line #9: Error inflating class fragment
  03-26 11:26:31.780: E/AndroidRuntime(5610):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
  03-26 11:26:31.780: E/AndroidRuntime(5610):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
  03-26 11:26:31.780: E/AndroidRuntime(5610):     at android.app.ActivityThread.access$600(ActivityThread.java:130)
  03-26 11:26:31.780: E/AndroidRuntime(5610):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
  03-26 11:26:31.780: E/AndroidRuntime(5610):     at android.os.Handler.dispatchMessage(Handler.java:99)
  03-26 11:26:31.780: E/AndroidRuntime(5610):     at android.os.Looper.loop(Looper.java:137)
  03-26 11:26:31.780: E/AndroidRuntime(5610):     at android.app.ActivityThread.main(ActivityThread.java:4745)
  03-26 11:26:31.780: E/AndroidRuntime(5610):     at java.lang.reflect.Method.invokeNative(Native Method)
  03-26 11:26:31.780: E/AndroidRuntime(5610):     at java.lang.reflect.Method.invoke(Method.java:511)
  03-26 11:26:31.780: E/AndroidRuntime(5610):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
  03-26 11:26:31.780: E/AndroidRuntime(5610):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
  03-26 11:26:31.780: E/AndroidRuntime(5610):     at dalvik.system.NativeStart.main(Native Method)
  03-26 11:26:31.780: E/AndroidRuntime(5610): Caused by: android.view.InflateException: Binary XML file line #9: Error inflating class fragment
  03-26 11:26:31.780: E/AndroidRuntime(5610):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
  03-26 11:26:31.780: E/AndroidRuntime(5610):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
  03-26 11:26:31.780: E/AndroidRuntime(5610):     at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
  03-26 11:26:31.780: E/AndroidRuntime(5610):     at 
  .
  .
  .
  </code></pre>