title: Android error inflating class fragment in layout-large
body: <p>Hi i'm creating an android app that uses a TabActivity and has 5 tabs each tab has a FragmentActivity class when a tab is clicked the FragmentActivity loads a fragment and i can be able to replace the fragment with another I've used  this approach since i'm creating an app that should be similar to an iphone app. I have two layout folders layout for the normal phone and layout-large for tablets. This app works okay except when it comes to the tablet layout where i get an error inflating class fragment on the onCreateView when inflating the layout. the layout-large xml files have a two pane layout </p>
  
  <p>here's the code for the FragmentActivity</p>
  
  <pre><code>    public class ManageTab3 extends FragmentActivity {
       @Override
          protected void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              setContentView(R.layout.fragmentstackctivity);
  
              // add initial fragment, do not add to back stack, no transition animation
              addFragment(new MoreFragment(), false, FragmentTransaction.TRANSIT_NONE);
  
          }
        void addFragment(Fragment fragment, boolean addToBackStack, int transition) {
              FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
              ft.replace(R.id.simple_fragment, fragment);
              ft.setTransition(transition);
              if (addToBackStack)
                  ft.addToBackStack(null);
              ft.commit();
          }
  
  }
  </code></pre>
  
  <p>and here is the fragment being added </p>
  
  <pre><code>@Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  }
  
   @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle 
                        savedInstanceState) {
   View fragmentView = inflater.inflate(R.layout.more, container, false); 
   Button button1 = (Button) fragmentView.findViewById(R.id.button_abbreviations); 
    button1.setOnClickListener(new OnClickListener(){ public void onClick(View v){ 
        addAbbrevs();
    }}
    );
    Button button2 = (Button) fragmentView.findViewById(R.id.button_info); 
    button2.setOnClickListener(new OnClickListener(){ public void onClick(View v){ 
        addInfo();
    }}
    );
    Button button3 = (Button) fragmentView.findViewById(R.id.button_help); 
    button3.setOnClickListener(new OnClickListener(){ public void onClick(View v){ 
        addHelp();
    }}
    );
    Button button4 = (Button) fragmentView.findViewById(R.id.button_about); 
    button4.setOnClickListener(new OnClickListener(){ public void onClick(View v){ 
        addAbout();
    }}
    );
      return fragmentView;
  </code></pre>
  
  <p>}</p>
  
  <p>here is the xml file for layout  more.xml</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" 
      android:gravity="center_vertical|center_horizontal"
      android:background="#F2F2F2"&gt;
      &lt;LinearLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/title"
      android:layout_width="match_parent"
      android:layout_height="35dip"
      android:layout_weight="1"
     android:orientation="horizontal" 
    &gt;
       &lt;TextView android:id="@+id/textt" 
      android:layout_width="match_parent"
      android:layout_height="40dip"
      android:text="@string/more"
      android:textSize="15dip"
      android:gravity="center|center_vertical"
      android:textColor="#191997"/&gt;
    &lt;/LinearLayout&gt;
     &lt;LinearLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_weight="25"
     android:layout_marginTop="50dp"
     android:orientation="vertical" 
    &gt;
       &lt;Button
                 android:id="@+id/button_abbreviations"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:text="@string/abbreviations"
                 android:textColor="#191997"
                 android:background="@drawable/btn_background"/&gt;   
       &lt;Button
                 android:id="@+id/button_info"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:text="@string/info"
                 android:textColor="#191997"
                 android:background="@drawable/btn_background"/&gt;
        &lt;Button
                 android:id="@+id/button_help"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:text="@string/help"
                 android:textColor="#191997"
                 android:background="@drawable/btn_background"/&gt;
       &lt;Button
                 android:id="@+id/button_about"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:text="@string/about"
                 android:textColor="#191997"
                 android:background="@drawable/btn_background"/&gt;
       &lt;/LinearLayout&gt;
     &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>and here is the xml file for the layout-large more.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="horizontal"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;fragment android:name="babla.dict.MoreFragment"
                android:id="@+id/more_fragment"
                android:layout_weight="1"
                android:layout_width="0dp"
                android:layout_height="match_parent" /&gt;
  
      &lt;fragment android:name="babla.dict.DetailsFragment"
                android:id="@+id/details_fragment"
                android:layout_weight="2"
                android:layout_width="0dp"
                android:layout_height="match_parent" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>here is the logcat error messages</p>
  
  <pre><code>    01-26 20:42:49.713: E/AndroidRuntime(572): FATAL EXCEPTION: main
  01-26 20:42:49.713: E/AndroidRuntime(572): java.lang.RuntimeException: Unable to start activity ComponentInfo{babla.dict/babla.dict.MultiLingualDictionaryActivity}: java.lang.RuntimeException: Unable to start activity ComponentInfo{babla.dict/babla.dict.ManageTab3}: android.view.InflateException: Binary XML file line #8: Error inflating class fragment
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.app.ActivityThread.access$600(ActivityThread.java:123)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.os.Handler.dispatchMessage(Handler.java:99)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.os.Looper.loop(Looper.java:137)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.app.ActivityThread.main(ActivityThread.java:4424)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at java.lang.reflect.Method.invokeNative(Native Method)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at java.lang.reflect.Method.invoke(Method.java:511)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at dalvik.system.NativeStart.main(Native Method)
  01-26 20:42:49.713: E/AndroidRuntime(572): Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{babla.dict/babla.dict.ManageTab3}: android.view.InflateException: Binary XML file line #8: Error inflating class fragment
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.app.ActivityThread.startActivityNow(ActivityThread.java:1797)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:135)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:347)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:682)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.widget.TabHost.setCurrentTab(TabHost.java:346)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.widget.TabHost.addTab(TabHost.java:236)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at babla.dict.MultiLingualDictionaryActivity.onCreate(MultiLingualDictionaryActivity.java:30)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.app.Activity.performCreate(Activity.java:4465)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
  01-26 20:42:49.713: E/AndroidRuntime(572):  ... 11 more
  01-26 20:42:49.713: E/AndroidRuntime(572): Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class fragment
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:697)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at babla.dict.MoreFragment.onCreateView(MoreFragment.java:21)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.support.v4.app.Fragment.performCreateView(Fragment.java:1460)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:884)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1066)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1168)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:280)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:669)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at babla.dict.MoreFragment.onCreateView(MoreFragment.java:21)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.support.v4.app.Fragment.performCreateView(Fragment.java:1460)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:911)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1088)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1444)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:551)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1133)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.app.Activity.performStart(Activity.java:4475)
  01-26 20:42:49.713: E/AndroidRuntime(572):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1929)
  01-26 20:42:49.713: E/AndroidRuntime(572):  ... 21 more
  01-26 20:42:49.713: E/AndroidRuntime(572): Caused by: java.lang.Ill
  </code></pre>
  
  <p>please help</p>