title: InflateException When Trying to Load Fragment
body: <p>I am trying to load a fragment from my activity and am getting the an error as below:</p>
  
  <pre><code>07-25 21:09:53.221 31245-31245/kitchenpal.troychuinard.com.kitchenpal E/AndroidRuntime: FATAL EXCEPTION: main
  Process: kitchenpal.troychuinard.com.kitchenpal, PID: 31245
  java.lang.RuntimeException: Unable to start activity ComponentInfo{kitchenpal.troychuinard.com.kitchenpal/kitchenpal.troychuinard.com.kitchenpal.IndividualRecipeActivity}: android.view.InflateException: Binary XML file line #9: Binary XML file line #9: Error inflating class fragment
      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2665)
      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
      at android.app.ActivityThread.-wrap12(ActivityThread.java)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
      at android.os.Handler.dispatchMessage(Handler.java:102)
      at android.os.Looper.loop(Looper.java:154)
      at android.app.ActivityThread.main(ActivityThread.java:6119)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
   Caused by: android.view.InflateException: Binary XML file line #9: Binary XML file line #9: Error inflating class fragment
   Caused by: android.view.InflateException: Binary XML file line #9: Error inflating class fragment
   Caused by: java.lang.NullPointerException
      at java.lang.VMClassLoader.findLoadedClass(Native Method)
      at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:742)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:362)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
      at android.support.v4.app.Fragment.isSupportFragmentClass(Fragment.java:404)
      at android.support.v4.app.FragmentManagerImpl.onCreateView(FragmentManager.java:3679)
      at android.support.v4.app.FragmentController.onCreateView(FragmentController.java:114)
      at android.support.v4.app.FragmentActivity.dispatchFragmentsOnCreateView(FragmentActivity.java:374)
      at android.support.v4.app.BaseFragmentActivityApi14.onCreateView(BaseFragmentActivityApi14.java:39)
      at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:68)
      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:777)
      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
      at android.view.LayoutInflater.rInflate(LayoutInflater.java:858)
      at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
      at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
      at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
      at android.view.LayoutInflater.inflate(LayoutInflater.java:377)
      at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:412)
      at android.app.Activity.setContentView(Activity.java:2414)
      at kitchenpal.troychuinard.com.kitchenpal.IndividualRecipeActivity.onCreate(IndividualRecipeActivity.java:15)
  </code></pre>
  
  <p>I understand it may have to do with the support library that I am using for my fragment manager.</p>
  
  <pre><code>public class IndividualRecipeActivity extends AppCompatActivity implements RecipeStepsFragment.OnFragmentInteractionListener {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_individual_recipe);
  
      if (savedInstanceState == null){
  
  
          RecipeStepsFragment recipeStepsFragment = new RecipeStepsFragment();
          FragmentManager fm = getSupportFragmentManager();
          fm.beginTransaction()
                  .add(R.id.recipe_list_fragment, recipeStepsFragment)
                  .commit();
  
      }
  }
  
  @Override
  public void onFragmentInteraction(Uri uri) {
  
       }
  }
  </code></pre>
  
  <p>Fragment:</p>
  
  <pre><code> public class RecipeStepsFragment extends Fragment {
      // TODO: Rename parameter arguments, choose names that match
      // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
      private static final String ARG_PARAM1 = "param1";
      private static final String ARG_PARAM2 = "param2";
  
      // TODO: Rename and change types of parameters
      private String mParam1;
      private String mParam2;
  
      private OnFragmentInteractionListener mListener;
  
      public RecipeStepsFragment() {
          // Required empty public constructor
      }
  
      /**
       * Use this factory method to create a new instance of
       * this fragment using the provided parameters.
       *
       * @param param1 Parameter 1.
       * @param param2 Parameter 2.
       * @return A new instance of fragment RecipeStepsFragment.
       */
      // TODO: Rename and change types and number of parameters
      public static RecipeStepsFragment newInstance(String param1, String param2) {
          RecipeStepsFragment fragment = new RecipeStepsFragment();
          Bundle args = new Bundle();
          args.putString(ARG_PARAM1, param1);
          args.putString(ARG_PARAM2, param2);
          fragment.setArguments(args);
          return fragment;
      }
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          if (getArguments() != null) {
              mParam1 = getArguments().getString(ARG_PARAM1);
              mParam2 = getArguments().getString(ARG_PARAM2);
          }
      }
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
          // Inflate the layout for this fragment
          return inflater.inflate(R.layout.fragment_recipe_steps, container, false);
      }
  
      // TODO: Rename method, update argument and hook method into UI event
      public void onButtonPressed(Uri uri) {
          if (mListener != null) {
              mListener.onFragmentInteraction(uri);
          }
      }
  
      @Override
      public void onAttach(Context context) {
          super.onAttach(context);
          if (context instanceof OnFragmentInteractionListener) {
              mListener = (OnFragmentInteractionListener) context;
          } else {
              throw new RuntimeException(context.toString()
                      + " must implement OnFragmentInteractionListener");
          }
      }
  
      @Override
      public void onDetach() {
          super.onDetach();
          mListener = null;
      }
  
      /**
       * This interface must be implemented by activities that contain this
       * fragment to allow an interaction in this fragment to be communicated
       * to the activity and potentially other fragments contained in that
       * activity.
       * &lt;p&gt;
       * See the Android Training lesson &lt;a href=
       * "http://developer.android.com/training/basics/fragments/communicating.html"
       * &gt;Communicating with Other Fragments&lt;/a&gt; for more information.
       */
      public interface OnFragmentInteractionListener {
          // TODO: Update argument type and name
          void onFragmentInteraction(Uri uri);
      }
  }
  </code></pre>
  
  <p>XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;fragment
      android:id="@+id/recipe_list_fragment"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  &lt;/fragment&gt;
  </code></pre>
  
  <p></p>