title: Android.content.ActivityNotFoundException: Unable to find explicit activity class - Intent in a Fragment
body: <p>The application is causing an error in run time when I am using the application, it is an error in the intent but there is no error in the code from what I can see, it says:</p>
  
  <pre><code>    android.content.ActivityNotFoundException: Unable to find explicit activity class .... have you declared this activity in your AndroidManifest.xml?
  </code></pre>
  
  <p>However it does not need to be stated in the manifest as it is a fragment, I have stated the Activity in the manifest which it inflates from.</p>
  
  <pre><code>        @Override
  public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {   //I
      Intent i = new Intent(ViewAllRecipe.this.getActivity(), EditRecipesFragment.class);
      HashMap&lt;String, String&gt; map = (HashMap) parent.getItemAtPosition(position);
      String RecId = map.get(Config.TAG_ID).toString();
      i.putExtra(Config.REC_ID, RecId);
      getActivity().startActivity(i);
  }
  </code></pre>
  
  <p>The error is coming from the:</p>
  
  <pre><code>    getActivity().startActivity(i);
  </code></pre>
  
  <p>The Activity which it is being inflated from is, also other fragments are working fine only this one;</p>
  
  <pre><code>       &lt;activity
          android:name=".NavigationActivity"
          android:label="@string/app_name" &gt;
      &lt;/activity&gt;
  </code></pre>
  
  <p>Thank you!</p>