title: The method add(int, Fragment) in the type FragmentTransaction is not applicable for the arguments (int, WeatherFragment)
body: <p>I have error in fragment:</p>
  
  <blockquote>
    <p>"The method replace(int, Fragment) in the type Fragment Transaction is
    not applicable for the arguments (int, Fragment)"</p>
  </blockquote>
  
  <p>What should I do? My fragment doesn't appear.</p>
  
  <pre><code>    package com.example.weather;
  
      import android.support.v7.app.ActionBarActivity;
  
      import android.support.v4.app.Fragment;
  
      import android.text.InputType;
      import android.app.AlertDialog;
  
      import android.content.DialogInterface;
  
      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.EditText;
  
      import android.os.Build;
  
      public class WeatherActivity extends ActionBarActivity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_weather);
          if (savedInstanceState == null) {
              getSupportFragmentManager().beginTransaction()
                      .add(R.id.container, new WeatherFragment())
                      .commit();
          }
      }
  
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          if(item.getItemId() == R.id.change_city){
              showInputDialog();
          }
          return false;
      }
  
      private void showInputDialog(){
          AlertDialog.Builder builder = new AlertDialog.Builder(this);
          builder.setTitle("Change city");
          final EditText input = new EditText(this);
          input.setInputType(InputType.TYPE_CLASS_TEXT);
          builder.setView(input);
          builder.setPositiveButton("Go", new DialogInterface.OnClickListener() {
              @Override
              public void onClick(DialogInterface dialog, int which) {
                  changeCity(input.getText().toString());
              }
          });
          builder.show();
      }
  
      public void changeCity(String city){
          WeatherFragment wf = (WeatherFragment) getFragmentManager()
                  .findFragmentById(R.id.container);
          wf.changeCity(city);
          new CityPreference(this).setCity(city);
      }
  }
  </code></pre>