title: Cannot Resolve method Android Studio
body: <p>How can I resolve this error? I am getting an error on this code:</p>
  <blockquote>
  <p>Cannot resolve method 'add(int, android.trey.startingpoint.nl.SecondActivity.PlaceHolderFragment)'</p>
  </blockquote>
  <pre><code>    protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_second);
  
      if (savedInstanceState == null) {
          getFragmentManager().beginTransaction()
                  .add(R.id.container, new PlaceholderFragment()).commit();
      }
  }
  
   public static class PlaceholderFragment extends Fragment {
  
      public PlaceholderFragment() {
      }
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
          View rootView = inflater.inflate(R.layout.fragment_second, container, false);
          return rootView;
      }
  }
  </code></pre>
  <p>Thanks for the help!</p>
  <p>Edit:Imports:</p>
  <blockquote>
  <p>import android.app.Activity;
  import android.support.v4.app.Fragment;</p>
  <p>import android.os.Bundle; import android.view.LayoutInflater; import
  android.view.Menu; import android.view.MenuItem; import
  android.view.View; import android.view.ViewGroup; import
  android.widget.Toast;</p>
  <p>import com.google.android.gms.maps.CameraUpdateFactory; import
  com.google.android.gms.maps.GoogleMap; import
  com.google.android.gms.maps.MapFragment; import
  com.google.android.gms.maps.model.BitmapDescriptorFactory; import
  com.google.android.gms.maps.model.CameraPosition; import
  com.google.android.gms.maps.model.LatLng; import
  com.google.android.gms.maps.model.MarkerOptions;</p>
  </blockquote>