title: Emulator crashes after running code
body: <p>This is the XML file for the main fragment that i am currently dealing with. the problem i am having is that when i clean the project it does not give me any errors but when i run the program the emulator crashes.</p>
  
  <pre><code>    &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:tools="http://schemas.android.com/tools"
          android:id="@+id/LinearLayout1"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical"
          android:paddingBottom="@dimen/activity_vertical_margin"
          android:paddingLeft="@dimen/activity_horizontal_margin"
          android:paddingRight="@dimen/activity_horizontal_margin"
          android:paddingTop="@dimen/activity_vertical_margin"
          tools:context="com.example.budgetfuel.MainActivity$PlaceholderFragment" &gt;
  
          &lt;LinearLayout
              android:id="@+id/LinearLayout1"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:orientation="horizontal"
              android:paddingBottom="20dp" &gt;
  
              &lt;TextView
                  android:id="@+id/textView3"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:text="Select Car:"
                  android:textAppearance="?android:attr/textAppearanceSmall" /&gt;
  
              &lt;Spinner
                  android:id="@+id/spinner1"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_weight="1" /&gt;
          &lt;/LinearLayout&gt;
  
  
  
      &lt;LinearLayout
          android:id="@+id/LinearLayout2"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:paddingBottom="20dp" &gt;
  
          &lt;TextView
              android:id="@+id/textView1"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Price Per Litre:"
              android:textAppearance="?android:attr/textAppearanceSmall" /&gt;
  
          &lt;EditText
              android:id="@+id/editText1"
              android:layout_width="171dp"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:ems="10" /&gt;
      &lt;/LinearLayout&gt;
  
      &lt;Space
          android:id="@+id/Space1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="fill_vertical" /&gt;
  
      &lt;LinearLayout
          android:id="@+id/LinearLayout3"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:paddingBottom="20dp" &gt;
  
          &lt;TextView
              android:id="@+id/textView2"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_weight="0.66"
              android:text="Litres:"
              android:textAppearance="?android:attr/textAppearanceSmall" /&gt;
  
          &lt;EditText
              android:id="@+id/editText2"
              android:layout_width="171dp"
              android:layout_height="wrap_content"
              android:layout_weight="0.27"
              android:ems="10" /&gt;
      &lt;/LinearLayout&gt;
  
  
  
      &lt;LinearLayout
          android:id="@+id/LinearLayout4"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="horizontal"
          android:paddingBottom="20dp" &gt;
  
          &lt;TextView
              android:id="@+id/textView4"
              android:layout_width="wrap_content"
              android:layout_height="34dp"
              android:layout_weight="0.80"
              android:text="Odo Reading:"
              android:textAppearance="?android:attr/textAppearanceSmall" /&gt;
  
          &lt;EditText
              android:id="@+id/editText3"
              android:layout_width="186dp"
              android:layout_height="wrap_content"
              android:layout_weight="0.40"
              android:ems="10" &gt;
  
              &lt;requestFocus /&gt;
          &lt;/EditText&gt;
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:id="@+id/LinearLayout5"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="horizontal"
          android:paddingBottom="20dp" &gt;
  
          &lt;TextView
              android:id="@+id/textView5"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_weight="0.20"
              android:text="Date:"
              android:textAppearance="?android:attr/textAppearanceSmall" /&gt;
  
          &lt;Button
              android:id="@+id/buttonDateSet"
              android:layout_width="140dp"
              android:layout_height="wrap_content"
              android:text="Change Date:" /&gt;
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
           android:id="@+id/LinearLayout6"
          android:layout_height="wrap_content" &gt;
  
          &lt;TextView
              android:id="@+id/Output"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:textAppearance="?android:attr/textAppearanceSmall" /&gt;
  
      &lt;/LinearLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>