title: force down error in app
body: <p>I have a problem on running my app but i cant find out where is the problem! I have created a first screen that has two buttons. This "home" screen is chordsApp.java. I want to go to the track1.java if I press the first button and to track2.java if I press the second! The program runs but when I'm trying to press the first or the second button it pops up an error and tells me to force down!! Here is the code:</p>
  
  <p><strong>ChordApp.java</strong></p>
  
  <pre><code>package com.example.ChordsApp;
  
  import android.app.Activity;
  import android.content.Intent;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.Button;
  
  public class ChordsApp extends Activity {
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
          Button next = (Button) findViewById(R.id.button);
          next.setOnClickListener(new View.OnClickListener() {
              public void onClick(View view) {
                  Intent myIntent = new Intent(view.getContext(), track1.class);
                  startActivityForResult(myIntent,0);
              }
  
          });
          Button next1 = (Button) findViewById(R.id.button1);
          next1.setOnClickListener(new View.OnClickListener() {
              public void onClick(View view) {
                  Intent myIntent = new Intent(view.getContext(), track2.class);
                  startActivityForResult(myIntent, 0);
              }
  
          });
  
      }
  
  }
  </code></pre>
  
  <p><strong>track1.java</strong></p>
  
  <pre><code>package com.example.ChordsApp;
  
  import android.app.Activity;
  import android.content.Intent;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.Button;
  
  public class track1 extends Activity {
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main2);
  
          Button next = (Button) findViewById(R.id.button3);
          next.setOnClickListener(new View.OnClickListener() {
          public void onClick(View view) {
                  Intent intent = new Intent();
                  setResult(RESULT_OK, intent);
                  finish();
             }
  
         });
  
      }
  }
  </code></pre>
  
  <p><strong>track2.java</strong></p>
  
  <pre><code>package com.example.ChordsApp;
  
  import android.app.Activity;
  import android.content.Intent;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.Button;
  
  public class track2 extends Activity {
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main3);
  
          Button next1 = (Button) findViewById(R.id.button4);
          next1.setOnClickListener(new View.OnClickListener() {
          public void onClick(View view) {
                  Intent intent = new Intent();
                  setResult(RESULT_OK, intent);
                  finish();
             }
  
         });
  
      }
  }
  </code></pre>
  
  <p><strong>main.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;LinearLayout 
          xmlns:android="http://schemas.android.com/apk/res/android"
          android:orientation="vertical"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          &gt;
          &lt;ImageView 
              android:id="@+id/pic"
              android:adjustViewBounds="true"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:src="@drawable/guitar"
              android:layout_gravity="center"
         /&gt;
          &lt;TextView  
              android:layout_width="fill_parent" 
              android:layout_height="wrap_content" 
              android:text="@string/hello"
              /&gt;  
      &lt;LinearLayout
         android:orientation="vertical"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center_horizontal" &gt;
              &lt;Button
                  android:text="track1"
                  android:id="@+id/button"
                  android:layout_width="250px"
                  android:textSize="18px"
                  android:layout_height="55px" /&gt;    
         &lt;Button 
                  android:text="track2"
                  android:id="@+id/button1"
                  android:layout_width="250px"
                  android:textSize="18px"
                  android:layout_height="55px" /&gt; 
      &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><strong>main2.xml</strong></p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  &gt;
  &lt;TextView
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:text="hi"/&gt;
  
  &lt;Button android:text="Home"
      android:id="@+id/button3"
      android:layout_width="250px"
          android:textSize="18px"
      android:layout_height="55px"
      android:layout_gravity="center_horizontal"
      &gt; 
  
     &lt;/Button&gt;  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><strong>main3.xml</strong></p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
   &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  &gt;
  &lt;TextView
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:text="hi"/&gt;
  
  &lt;Button android:text="Home"
      android:id="@+id/button4"
      android:layout_width="250px"
          android:textSize="18px"
      android:layout_height="55px"
      android:layout_gravity="center_horizontal"
      &gt; 
  
  &lt;/Button&gt;  
  &lt;/LinearLayout&gt;
  </code></pre>