title: Thread exiting with uncaught exception (group=0x4001d800) FATAL EXCEPTION:Main
body: <p>I'm still very new to this so the solution is probably obvious.
  Any way I'm trying to make the buttons in this app open new activities but when I run it, forcecloses. Does anyone know what's wrong? I was going to use something called list view but that didn't use the XML I made for the class.</p>
  
  <pre><code>package com.example.musicbynumbers;
  
  import android.os.Bundle;
  import android.app.Activity;
  import android.app.ListActivity;
  import android.content.Intent;
  import android.view.Menu;
  import android.view.View;
  import android.widget.ArrayAdapter;
  import android.widget.Button;
  import android.widget.ImageButton;
  import android.widget.ListView;
  
  public class MainMenu extends Activity implements View.OnClickListener  {
      Button majScales, minHarm, minMel;
      ImageButton mainMenu;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          // TODO Auto-generated method stub
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main_menu);
          mainMenu = (ImageButton) findViewById(R.id.imagelogo);
          majScales = (Button) findViewById(R.id.majorscalesb);
  
  
      }
  
  
  
  
           @Override
              public void onClick(View arg0) {
                  // TODO Auto-generated method stub
                  switch(arg0.getId()){
                  case R.id.imagelogo:
                      Intent i =  new Intent(MainMenu.this, MainMenu.class);
                      startActivity(i);
                      break;
                  case R.id.majorscalesb:
                      Intent j = new Intent(MainMenu.this, majorScales.class);
                      startActivity(j);
                      break;}
  
      }
  
  }
  </code></pre>
  
  <p>Layout:</p>
  
  <pre><code>    &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"
      android:weightSum="80"
      tools:context=".MainMenu"
  
       &gt;
  
      &lt;ImageButton
          android:id="@+id/imagelogo"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:src="@drawable/ic_launcher"
          android:layout_weight="10"
          android:gravity="center" /&gt;
  
      &lt;Button
          android:id="@+id/majorscalesb"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_weight="10"
          android:text="Major Scales"
          android:gravity="center" /&gt;
  
      &lt;Button
          android:id="@+id/minormelodicb"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_weight="10"
          android:text="Minor Melodic Scales" 
          android:gravity="center"/&gt;
  
      &lt;Button
          android:id="@+id/minorharmonicb"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_weight="10"
          android:text="Minor Harmonic Scales" 
          android:gravity="center"/&gt;
  
      &lt;Button
          android:id="@+id/arpeggiosb"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_weight="10"
          android:text="Arpeggios"
          android:gravity="center" /&gt;
  
        &lt;Button
            android:id="@+id/chromaticscalesb"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="10"
            android:text="Chromatic Scales"
            android:gravity="center" /&gt;
  
      &lt;Button
          android:id="@+id/contraryb"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_weight="10"
          android:text="Contrary Motion"
          android:gravity="center" /&gt;
  
      &lt;Button
          android:id="@+id/aboutb"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_weight="10"
          android:text="About" 
          android:gravity="center"
          &gt;
      &lt;/Button&gt;
  
  &lt;/LinearLayout&gt;
  </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.example.musicbynumbers"
      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.example.musicbynumbers.MainMenu"
              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;activity
              android:name="com.example.musicbynumbers.majorScales"
              android:label="@string/app_name" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="com.example.musicbynumbers.majorScales" /&gt;
  
                  &lt;category android:name="android.intent.category.DEFAULT" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  
  
  &lt;/manifest&gt;
  </code></pre>