title: Android Studio: Intents keep crashing the application
body: <p>I literally have two different projects open with the EXACT same code, except that they have different class names.</p>
  
  <p>One of them works fine, the other crashes when I click the button that executes the intent. It is driving me crazy.</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
      Button b;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          b = (Button) findViewById(R.id.button2);
          b.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  Intent i = new Intent(getApplicationContext(), New.class);
                  startActivity(i);
              }
          });
  
      }
  }
  </code></pre>
  
  <p>Although I really don't know how useful this is, because this exact code works in a different project.</p>