title: Android - How to open Activity by clicking button
body: <p>How do I open an Activity(GameProcess) by clicking on a button(ButStart)?</p>
  
  <p>I already edited it and take to manifest. What mistakes do you see? It crashes when I tap the button(ButStart).</p>
  
  <pre><code>package com.makeandroid.klikomania;
  
  public class KlikomaniaActivity extends Activity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
      final Button Butstart = (Button)findViewById(R.id.butstart);
      final Button Butrez = (Button)findViewById(R.id.butrez);
  
      Butstart.setOnClickListener(new View.OnClickListener() {
          public void onClick(View v) {
              Intent intent = new Intent(KlikomaniaActivity.this,GameProcess.class); 
               startActivity(intent);
          }
      });
  }
  
  }
  </code></pre>
  
  <p>And Here is GameProgress Activity:</p>
  
  <pre><code>package com.makeandroid.klikomania;
  
  
  public class GameProcess extends Activity {
  
  
  
   @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.gameprocess);
  
          }
   }
  </code></pre>
  
  <p>Manifest:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.makeandroid.klikomania"
  android:versionCode="1"
  android:versionName="1.0" &gt;
  
  &lt;uses-sdk
      android:minSdkVersion="8"
      android:targetSdkVersion="16" /&gt;
  
  &lt;application
      android:allowBackup="true"
      android:icon="@drawable/ic_launcher"
      android:label="@string/app_name"
      android:theme="@style/AppTheme" &gt;
      &lt;activity android:name="com.makeandroid.klikomania.GameProcess"&gt;&lt;/activity&gt;
      &lt;activity
          android:name="com.makeandroid.klikomania.KlikomaniaActivity"
          android:label="@string/app_name" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  
  &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>