title: ABS fragment crashes on onCreate
body: <p>i'm in need of some help regarding ActionBar Sherlock fragments.</p>
  
  <p>I'm quite new to android programming but i've basically followed <a href="http://goo.gl/Nikyg" rel="nofollow">http://goo.gl/Nikyg</a> (stackoverflow post) to create my fragments but the app crashes everytime i try to run on android 2.2 or 4.0</p>
  
  <p>Can anyone help me? Code is as follows:</p>
  
  <p>Mainactivity.java</p>
  
  <pre><code>package br.com.example.fragmented;
  
  import android.os.Bundle;
  import com.actionbarsherlock.app.SherlockFragmentActivity;
  
  public class MainActivity extends SherlockFragmentActivity {
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
      }
  
  }
  </code></pre>
  
  <p>Layout file activity_main</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical" &gt;
  
      &lt;Spinner
          android:id="@+id/spinner1"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content" /&gt;
  
      &lt;Spinner
          android:id="@+id/spinner2"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content" /&gt;
  
      &lt;fragment class="br.com.example.fragment1"
          android:id="@+id/fragment1"
          android:name="com.actionbarsherlock.app.SherlockFragment"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_weight="0.85" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>fragment1.java</p>
  
  <pre><code>package br.com.example.fragmented;
  
  import android.os.Bundle;
  import android.util.Log;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import com.actionbarsherlock.app.SherlockFragment;
  
  public class fragment1 extends SherlockFragment{
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          Log.i("First Fragment", "onCreate()");
      }
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
              Bundle savedInstanceState) {
          Log.i("First Fragment", "onCreateView()");
          return inflater.inflate(R.layout.fragment1layout, container, false);
      }
  }
  </code></pre>
  
  <p>fragment1layout.xml</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical" android:layout_width="fill_parent"
      android:layout_height="fill_parent" android:background="#000000"&gt;
  
      &lt;Button android:text="Landscape" 
          android:id="@+id/button1"
          android:layout_width="wrap_content" 
          android:layout_height="wrap_content"&gt;
  
      &lt;/Button&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Can anyone point where i am missing the error here? OH and i have set Theme to Sherlock.Light on Manifest by the way.</p>
  
  <p>Added Log:</p>
  
  <pre><code>07-26 20:22:14.297: E/AndroidRuntime(401): FATAL EXCEPTION: main
  07-26 20:22:14.297: E/AndroidRuntime(401): java.lang.RuntimeException: Unable to start activity ComponentInfo{br.com.example.fragmented/br.com.example.fragmented.MainActivity}: android.view.InflateException: Binary XML file line #17: Error inflating class fragment
  07-26 20:22:14.297: E/AndroidRuntime(401):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
  07-26 20:22:14.297: E/AndroidRuntime(401):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
  07-26 20:22:14.297: E/AndroidRuntime(401):  at android.app.ActivityThread.access$2300(ActivityThread.java:125)
  07-26 20:22:14.297: E/AndroidRuntime(401):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
  07-26 20:22:14.297: E/AndroidRuntime(401):  at android.os.Handler.dispatchMessage(Handler.java:99)
  07-26 20:22:14.297: E/AndroidRuntime(401):  at android.os.Looper.loop(Looper.java:123)
  07-26 20:22:14.297: E/AndroidRuntime(401):  at android.app.ActivityThread.main(ActivityThread.java:4627)
  07-26 20:22:14.297: E/AndroidRuntime(401):  at java.lang.reflect.Method.invokeNative(Native Method)
  07-26 20:22:14.297: E/AndroidRuntime(401):  at java.lang.reflect.Method.invoke(Method.java:521)
  07-26 20:22:14.297: E/AndroidRuntime(401):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
  07-26 20:22:14.297: E/AndroidRuntime(401):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
  07-26 20:22:14.297: E/AndroidRuntime(401):  at dalvik.system.NativeStart.main(Native Method)
  07-26 20:22:14.297: E/AndroidRuntime(401): Caused by: android.view.InflateException: Binary XML file line #17: Error inflating class fragment
  07-26 20:22:14.297: E/AndroidRuntime(401):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:582)
  07-26 20:22:14.297: E/AndroidRuntime(401):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
  07-26 20:22:14.297: E/AndroidRuntime(401):  at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
  07-26 20:22:14.297: E/AndroidRuntime(401):  at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
  07-26 20:22:14.297: E/AndroidRuntime(401):  at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
  07-26 20:22:14.297: E/AndroidRuntime(401):  at com.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:857)
  07-26 20:22:14.297: E/AndroidRuntime(401):  at com.actionbarsherlock.app.SherlockFragmentActivity.setContentView(SherlockFragmentActivity.java:251)
  07-26 20:22:14.297: E/AndroidRuntime(401):  at br.com.example.fragmented.MainActivity.onCreate(MainActivity.java:12)
  07-26 20:22:14.297: E/AndroidRuntime(401):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
  07-26 20:22:14.297: E/AndroidRuntime(401):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
  07-26 20:22:14.297: E/AndroidRuntime(401):  ... 11 more
  07-26 20:22:14.297: E/AndroidRuntime(401): Caused by: android.support.v4.app.Fragment$InstantiationException: Unable to instantiate fragment br.com.example.fragment1: make sure class name exists, is public, and has an empty constructor that is public
  07-26 20:22:14.297: E/AndroidRuntime(401):  at android.support.v4.app.Fragment.instantiate(Fragment.java:395)
  07-26 20:22:14.297: E/AndroidRuntime(401):  at android.support.v4.app.Fragment.instantiate(Fragment.java:363)
  07-26 20:22:14.297: E/AndroidRuntime(401):  at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:264)
  07-26 20:22:14.297: E/AndroidRuntime(401):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:558)
  07-26 20:22:14.297: E/AndroidRuntime(401):  ... 20 more
  07-26 20:22:14.297: E/AndroidRuntime(401): Caused by: java.lang.ClassNotFoundException: br.com.example.fragment1 in loader dalvik.system.PathClassLoader[/data/app/br.com.example.fragmented-1.apk]
  07-26 20:22:14.297: E/AndroidRuntime(401):  at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
  07-26 20:22:14.297: E/AndroidRuntime(401):  at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
  07-26 20:22:14.297: E/AndroidRuntime(401):  at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
  07-26 20:22:14.297: E/AndroidRuntime(401):  at android.support.v4.app.Fragment.instantiate(Fragment.java:385)
  07-26 20:22:14.297: E/AndroidRuntime(401):  ... 23 more
  </code></pre>