Adding Chronometer to my Activity makes error
<p>I made an activity for a game that will select images base on the required part. But when i add chronometer to control the time of my activity, it makes an error and it force close the activity. But on my code, there's no error when i add the code for chronometer. On my Logcat it says: "Uncaught handler: thread main exiting due to uncaught exception" and many more error on Logcat. Here's my code, please help me find the problem, thank's in advance!</p>

<pre><code>import android.app.Activity;
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.Chronometer;
import android.widget.Gallery;
import android.widget.ImageView;
import android.widget.TextView;

public class Maingame extends Activity {
    private Gallery gallery;
    Chronometer mChronometer;


    @Override
    public void onCreate(Bundle savedInstanceState) {


    super.onCreate(savedInstanceState);
    setContentView(R.layout.maingame);

    Button button;
    mChronometer = (Chronometer) findViewById(R.id.time);
    // Watch for button clicks.
    button = (Button) findViewById(R.id.start);
    button.setOnClickListener(mStartListener);

    }

View.OnClickListener mStartListener = new OnClickListener() {
    public void onClick(View v) {
        mChronometer.start();
    }
};

{

    gallery = (Gallery) findViewById(R.id.examplegallery);
    gallery.setAdapter(new AddImgAdp(this));

    gallery.setOnItemClickListener(new OnItemClickListener() {

    public void onItemClick(AdapterView parent, View v, int position, long id) {
    // Displaying the position when the gallery item in clicked
        if (position == 0) {
            //Toast.makeText(Maingame.this, "heart", Toast.LENGTH_SHORT).show();
            TextView select = (TextView) findViewById(R.id.txt1);
              select.setText("heart"); 

        } else if (position == 1) {
            //Toast.makeText(Maingame.this, "lungs", Toast.LENGTH_SHORT).show();
            TextView select = (TextView) findViewById(R.id.txt2);
              select.setText("lungs");
        } else if (position == 2) {
            //Toast.makeText(Maingame.this, "brain", Toast.LENGTH_SHORT).show();
            TextView select = (TextView) findViewById(R.id.txt3);
              select.setText("brain");


        }
    }
    });
    Button clear = (Button)findViewById(R.id.clear);
    clear.setOnClickListener(new View.OnClickListener() {
        public void onClick(View v) {
            ((TextView) findViewById(R.id.txt1)).setText("");
            ((TextView) findViewById(R.id.txt2)).setText("");
            ((TextView) findViewById(R.id.txt3)).setText("");
        }
    });
    Button pause = (Button)findViewById(R.id.pause);
    pause.setOnClickListener(new View.OnClickListener(){
        public void onClick(View v) {
            moveTaskToBack(true);
        }

    });

    }


    public class AddImgAdp extends BaseAdapter {
    int GalItemBg;
    private Context cont;

    // Adding images.
    private Integer[] Imgid = {
    R.drawable.bladder, R.drawable.kidney, R.drawable.largeintestine, R.drawable.liver, R.drawable.lungs, R.drawable.stomach
    };

    public AddImgAdp(Context c) {
    cont = c;
    TypedArray typArray = obtainStyledAttributes(R.styleable.BodyPartsGame);
    GalItemBg = typArray.getResourceId(R.styleable.BodyPartsGame_android_galleryItemBackground, 0);
    typArray.recycle();
    }

    public int getCount() {
    return Imgid.length;
    }

    public Object getItem(int position) {
    return position;
    }

    public long getItemId(int position) {
    return position;
    }

    public View getView(int position, View convertView, ViewGroup parent) {
    ImageView imgView = new ImageView(cont);

    imgView.setImageResource(Imgid[position]);
    // Fixing width &amp; height for image to display
    imgView.setLayoutParams(new Gallery.LayoutParams(80, 70));
    imgView.setScaleType(ImageView.ScaleType.FIT_XY);
    imgView.setBackgroundResource(GalItemBg);

    return imgView;
    }
    }
    }
</code></pre>

<p>Here's my LogCat:</p>

<pre><code>07-31 02:05:55.150: E/AndroidRuntime(224): Uncaught handler: thread main exiting due to uncaught exception
07-31 02:05:55.180: E/AndroidRuntime(224): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{drj.thesis.tridi/drj.thesis.tridi.Maingame}: java.lang.NullPointerException
07-31 02:05:55.180: E/AndroidRuntime(224):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2417)
07-31 02:05:55.180: E/AndroidRuntime(224):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
07-31 02:05:55.180: E/AndroidRuntime(224):  at android.app.ActivityThread.access$2200(ActivityThread.java:119)
07-31 02:05:55.180: E/AndroidRuntime(224):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
07-31 02:05:55.180: E/AndroidRuntime(224):  at android.os.Handler.dispatchMessage(Handler.java:99)
07-31 02:05:55.180: E/AndroidRuntime(224):  at android.os.Looper.loop(Looper.java:123)
07-31 02:05:55.180: E/AndroidRuntime(224):  at android.app.ActivityThread.main(ActivityThread.java:4363)
07-31 02:05:55.180: E/AndroidRuntime(224):  at java.lang.reflect.Method.invokeNative(Native Method)
07-31 02:05:55.180: E/AndroidRuntime(224):  at java.lang.reflect.Method.invoke(Method.java:521)
07-31 02:05:55.180: E/AndroidRuntime(224):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
07-31 02:05:55.180: E/AndroidRuntime(224):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
07-31 02:05:55.180: E/AndroidRuntime(224):  at dalvik.system.NativeStart.main(Native Method)
07-31 02:05:55.180: E/AndroidRuntime(224): Caused by: java.lang.NullPointerException
07-31 02:05:55.180: E/AndroidRuntime(224):  at android.app.Activity.findViewById(Activity.java:1612)
07-31 02:05:55.180: E/AndroidRuntime(224):  at drj.thesis.tridi.Maingame.&lt;init&gt;(Maingame.java:49)
07-31 02:05:55.180: E/AndroidRuntime(224):  at java.lang.Class.newInstanceImpl(Native Method)
07-31 02:05:55.180: E/AndroidRuntime(224):  at java.lang.Class.newInstance(Class.java:1479)
07-31 02:05:55.180: E/AndroidRuntime(224):  at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
07-31 02:05:55.180: E/AndroidRuntime(224):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2409)
07-31 02:05:55.180: E/AndroidRuntime(224):  ... 11 more
</code></pre>

<p>Here's my maingame.xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;

&lt;LinearLayout android:id="@+id/LinearLayout01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android" android:background="@drawable/palybg"&gt;





    &lt;LinearLayout
        android:layout_width="70dp"
        android:layout_height="wrap_content"
        android:layout_gravity="top"
        android:gravity="bottom"
        android:orientation="vertical" android:layout_marginTop="10dp"&gt;

        &lt;Chronometer
            android:id="@+id/time"
            android:layout_width="50dp"
            android:layout_height="25dp"
            android:layout_gravity="center" android:textColor="#000000" android:layout_marginTop="10dp"/&gt;

        &lt;Button
            android:id="@+id/start"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Start" android:layout_gravity="center"/&gt;

        &lt;Button
            android:id="@+id/button1"
            android:layout_width="50dp"
            android:layout_height="50dp"
            android:layout_gravity="center" android:background="@drawable/finishbtn"/&gt;

        &lt;Button
            android:id="@+id/pause"
            android:layout_width="50dp"
            android:layout_height="50dp"
            android:layout_gravity="center" android:background="@drawable/pause"/&gt;
         &lt;Button
            android:id="@+id/clear"
            android:layout_width="50dp"
            android:layout_height="50dp"
            android:layout_gravity="center" android:background="@drawable/clear"/&gt;

&lt;TextView
        android:id="@+id/txt1"
        android:background="@drawable/rack"
        android:layout_width="65dp"
        android:gravity="center"
        android:layout_height="25dp"
        android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="#000000" android:textStyle="bold" android:typeface="sans"/&gt;
&lt;TextView
        android:id="@+id/txt2"
        android:background="@drawable/rack"
        android:layout_width="65dp"
        android:gravity="center"
        android:layout_height="25dp"
        android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="#000000" android:textStyle="bold" android:typeface="sans"/&gt;
&lt;TextView
        android:id="@+id/txt3"
        android:background="@drawable/rack"
        android:layout_width="65dp"
        android:gravity="center"
        android:layout_height="25dp"
        android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="#000000" android:textStyle="bold" android:typeface="sans"/&gt;

    &lt;TextView
        android:id="@+id/txt1"
        android:background="@drawable/rack"
        android:layout_width="65dp"
        android:gravity="center"
        android:layout_height="25dp"
        android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="#000000" android:textStyle="bold" android:typeface="sans"/&gt;
&lt;TextView
        android:id="@+id/txt2"
        android:background="@drawable/rack"
        android:layout_width="65dp"
        android:gravity="center"
        android:layout_height="25dp"
        android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="#000000" android:textStyle="bold" android:typeface="sans"/&gt;
&lt;TextView
        android:id="@+id/txt3"
        android:background="@drawable/rack"
        android:layout_width="65dp"
        android:gravity="center"
        android:layout_height="25dp"
        android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="#000000" android:textStyle="bold" android:typeface="sans"/&gt;

&lt;TextView
        android:id="@+id/txt1"
        android:background="@drawable/rack"
        android:layout_width="65dp"
        android:gravity="center"
        android:layout_height="25dp"
        android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="#000000" android:textStyle="bold" android:typeface="sans"/&gt;
&lt;TextView
        android:id="@+id/txt2"
        android:background="@drawable/rack"
        android:layout_width="65dp"
        android:gravity="center"
        android:layout_height="25dp"
        android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="#000000" android:textStyle="bold" android:typeface="sans"/&gt;
&lt;TextView
        android:id="@+id/txt3"
        android:background="@drawable/rack"
        android:layout_width="65dp"
        android:gravity="center"
        android:layout_height="25dp"
        android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="#000000" android:textStyle="bold" android:typeface="sans"/&gt;
    &lt;TextView
        android:id="@+id/txt1"
        android:background="@drawable/rack"
        android:layout_width="65dp"
        android:gravity="center"
        android:layout_height="25dp"
        android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="#000000" android:textStyle="bold" android:typeface="sans"/&gt;

    &lt;/LinearLayout&gt;

    &lt;Gallery
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/examplegallery"
        android:layout_width="242dp"
        android:layout_height="wrap_content"
        android:layout_weight="1" /&gt;

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