title: Load new page on button click in android?
body: <p>I am making a game in android. I want to make a main menu screen that has two buttons, one to start the game and one to display the how to screen.</p>
  
  <p>I have classes for both, but when I launch my name and test the buttons, the application crashes. Could someone please tell me what is wrong with my code?</p>
  
  <pre><code>       public void launch()
         {
              Intent i = new Intent();
              i.setClassName("com.testing.blockinvasion", "com.testing.blockinvasion.game");
              startActivity(i);
         }
  
         public void howto()
         {
              Intent i = new Intent();
              i.setClassName("com.testing.blockinvasion", "com.testing.blockinvasion.howto");
              startActivity(i);
         }
  
  }
  </code></pre>
  
  <p>My buttons are defined in my main.xml:</p>
  
  <pre><code> &lt;Button
       android:layout_height="wrap_content"
       android:layout_width="wrap_content"
       android:text="@string/Start"
       android:onClick="launch" /&gt;
  </code></pre>
  
  <p>EDIT: I ended up just deleting the project and starting another one and everything seems to work fine now.</p>