unknown Exception android
<p>This is my main file, which has image buttons, and it gives me an exception. When I click on courses image button, it just closes the application.</p>

<p>It works for rest of buttons (rest activities just consist a text view and button) whereas in courses view, I added 3 more buttons (before I added these 3 buttons, it used to work for switching between main and courses).</p>

<p>What i am trying to do is this:</p>

<p>Make 3 buttons in courses activity. They will navigate me to other views like "higher education" or "further education". In next views I will create a list which will display name of courses (like "CCNA" or "Health diploma"!). When the user clicks on course, it will display a picture and some text information about the course.</p>

<pre><code>package com.NVT.android;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;

public class Main extends Activity 
{
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) 
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        ImageButton CoursesButton = (ImageButton)findViewById(R.id.CoursesButton);
        ImageButton ILoveNescotButton = (ImageButton)findViewById(R.id.ILoveNescotButton);
        ImageButton CampusMapButton = (ImageButton)findViewById(R.id.CampusMapButton);
        ImageButton GettingHereButton = (ImageButton)findViewById(R.id.GettingHereButton);

        CoursesButton.setOnClickListener(new ImageButton.OnClickListener()
        {

            @Override
            public void onClick(View view) 
            {
                            Intent myIntent = new Intent(view.getContext(), Courses.class);
                            startActivityForResult(myIntent, 0);
            }

        });

        ILoveNescotButton.setOnClickListener(new ImageButton.OnClickListener()
        {

            @Override
            public void onClick(View view) 
            {
                            Intent myIntent = new Intent(view.getContext(), ILoveNescot.class);
                            startActivityForResult(myIntent, 0);
            }

        });

        CampusMapButton.setOnClickListener(new ImageButton.OnClickListener()
        {

            @Override
            public void onClick(View view) 
            {
                            Intent myIntent = new Intent(view.getContext(), CampusMap.class);
                            startActivityForResult(myIntent, 0);
            }

        });

        GettingHereButton.setOnClickListener(new ImageButton.OnClickListener()
        {

            @Override
            public void onClick(View view) 
            {
                            Intent myIntent = new Intent(view.getContext(), GettingHere.class);
                            startActivityForResult(myIntent, 0);
            }

        });

    }
}
</code></pre>

<p>Code for Courses View  "Courses.java" is given below,,,,</p>

<pre><code>package com.NVT.android;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

    public class Courses extends Activity 
    {

        /** Called when the activity is first created. */
        public void onCreate(Bundle savedInstanceState) 
        {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.courses);


            Button ButtonFurtherEducation = (Button)findViewById(R.id.Button_Courses_FurtherEducation);
            Button ButtonHigherEducation = (Button)findViewById(R.id.Button_Courses_HigherEducation);
            Button ButtonEmployernTraining = (Button)findViewById(R.id.Button_Courses_EmployersnTraining);
            Button next = (Button) findViewById(R.id.Button01);


            ButtonFurtherEducation.setOnClickListener(new Button.OnClickListener()
            {

                @Override
                public void onClick(View view) 
                {
                                Intent myIntent = new Intent(view.getContext(), FurtherEducationCourses.class);
                                startActivityForResult(myIntent, 0);
                }

            });


            ButtonHigherEducation.setOnClickListener(new Button.OnClickListener()
            {

                @Override
                public void onClick(View view) 
                {
                                Intent myIntent = new Intent(view.getContext(), HigherEducationCourses.class);
                                startActivityForResult(myIntent, 0);
                }

            });

            ButtonEmployernTraining.setOnClickListener(new Button.OnClickListener()
            {

                @Override
                public void onClick(View view) 
                {
                                Intent myIntent = new Intent(view.getContext(), EmployersTrainingCourses.class);
                                startActivityForResult(myIntent, 0);
                }

            });



            next.setOnClickListener(new View.OnClickListener() 
            {
                public void onClick(View view) 
                {
                    Intent intent = new Intent();
                    setResult(RESULT_OK, intent);
                    finish();
                }

            });
        }   
    }
</code></pre>

<p>and code for the   further Education Activity is given below,,,,</p>

<pre><code>package com.NVT.android;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

    public class FurtherEducationCourses extends Activity 
    {

        /** Called when the activity is first created. */
        public void onCreate(Bundle savedInstanceState) 
        {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.further_education);

            Button next = (Button) findViewById(R.id.Button01);
            next.setOnClickListener(new View.OnClickListener() 
            {
                public void onClick(View view) 
                {
                    Intent intent = new Intent();
                    setResult(RESULT_OK, intent);
                    finish();
                }

            });
        }   
    }
</code></pre>

<p>my Manifest coding as below</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.NVT.android"
      android:versionCode="1"
      android:versionName="1.0"&gt;
    &lt;application android:icon="@drawable/icon" android:label="@string/app_name"&gt;

        &lt;activity android:name=".Main"
                  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=".Courses"&gt;
        &lt;/activity&gt;
        &lt;activity android:name=".CampusMap"&gt;
        &lt;/activity&gt;
        &lt;activity android:name=".GettingHere"&gt;
        &lt;/activity&gt;
        &lt;activity android:name=".ILoveNescot"&gt;
        &lt;/activity&gt;


        &lt;activity android:name=".FurtherEducationCourses"&gt;
        &lt;/activity&gt;
        &lt;activity android:name=".HigherEducationCourses"&gt;
        &lt;/activity&gt;
        &lt;activity android:name=".EmployersTrainingCourses"&gt;
        &lt;/activity&gt;







    &lt;/application&gt;
    &lt;uses-sdk android:minSdkVersion="9" /&gt;

&lt;/manifest&gt; 
</code></pre>
