title: Cannot resolve symbol fab in Android Studio
body: <p>I am developing an app but I am having an issue with a piece of code. The same piece of code is giving me the same error for a few different pages.</p>
  
  <p>The code is as follows:</p>
  
  <pre><code> @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_login);
  
      buttonSignIn = (Button) findViewById(R.id.buttonSignIN);
  
      FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
      fab.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View view) {
              Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG).setAction("Action", null).show();
  
              buttonSignIn.setOnClickListener(this);
          }
      });
  }}
  </code></pre>
  
  <p>It gives me an error on the line below saying it cannot resolve symbol fab 
  <code>FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);</code></p>