title: Crash in my app starting activity
body: <p>Here I'm trying to create Login email and password functions.<br>
  the app works fine for this code of yours below:</p>
  
  <pre><code>public class StartActivity extends AppCompatActivity {
  
      private Button mRegButton;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_start);
          mRegButton = (Button) findViewById(R.id.start_reg_btn);
          mRegButton.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  Intent regIntent = new Intent(StartActivity.this, RegisterActivity.class);
                  startActivity(regIntent);
              }
          });
      }
  }
  </code></pre>
  
  <p>But when i add the code below to make the login button work, the app crashes:</p>
  
  <pre><code>public class StartActivity extends AppCompatActivity {
      private Button mRegButton;
      private Button mLoginButton;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_start);
          mRegButton = (Button) findViewById(R.id.start_reg_btn);
          mRegButton.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  Intent regIntent = new Intent(StartActivity.this, RegisterActivity.class);
                  startActivity(regIntent);
              }
          });
  
          mLoginButton = (Button) findViewById(R.id.login_btn);
          mLoginButton.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  Intent loginIntent = new Intent(StartActivity.this, Login.class);
                  startActivity(loginIntent);
              }
          });
          }
  }
  </code></pre>
  
  <p>please help. i have been wasting almost 4 hour trying to figure what is happening, but failed to get the problem solved.</p>