I am running a splash screen for 5 seconds. Once that time is over, instead of going to the next activity - MainActivity.java, my app terminates and gives me an error saying "Unfortunately My Application has stopped".

Please check out the LogCat below.

I am also thinking I might have written action android:name and category android:name incorrectly in AndroidManifest.xml.

I am very new at programming and am learning Android Studio off of an Eclipse tutorial. I would really appreciate detailed guidance.

Below is my code.

**AndroidMenifest.xml**
























**MainActivity.java**
























**Splash.xml**

package com.example.android.myapplication;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

/**
* Created by Psp on 2016-02-02.
*/
public class Splash extends Activity {


@Override
protected void onCreate(Bundle PLovesMishti) {
super.onCreate(PLovesMishti);
setContentView(R.layout.splash);

Thread timer = new Thread() {
public void run() {
try {
sleep(5000);

} catch (InterruptedException e) {
e.printStackTrace();

} finally {
Intent openStartingPoint = new Intent("com.example.android.myapplication.MainActivity");
startActivity(openStartingPoint);

}
}
};
timer.start();
}
}

**LogCat**

02-03 23:53:45.920: E/AndroidRuntime(4264): ***FATAL EXCEPTION: main***

02-03 23:53:45.920: E/AndroidRuntime(4264): Process: com.example.android.myapplication, PID: 4264

02-03 23:53:45.920: E/AndroidRuntime(4264): ***java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.android.myapplication/com.example.android.myapplication.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.Window.findViewById(int)' on a null object reference***

02-03 23:53:45.920: E/AndroidRuntime(4264): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2209)

02-03 23:53:45.920: E/AndroidRuntime(4264): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)

02-03 23:53:45.920: E/AndroidRuntime(4264): at android.app.ActivityThread.access$800(ActivityThread.java:144)

02-03 23:53:45.920: E/AndroidRuntime(4264): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)

02-03 23:53:45.920: E/AndroidRuntime(4264): at android.os.Handler.dispatchMessage(Handler.java:102)

02-03 23:53:45.920: E/AndroidRuntime(4264): at android.os.Looper.loop(Looper.java:135)

02-03 23:53:45.920: E/AndroidRuntime(4264): at android.app.ActivityThread.main(ActivityThread.java:5221)

02-03 23:53:45.920: E/AndroidRuntime(4264): at java.lang.reflect.Method.invoke(Native Method)

02-03 23:53:45.920: E/AndroidRuntime(4264): at java.lang.reflect.Method.invoke(Method.java:372)

02-03 23:53:45.920: E/AndroidRuntime(4264): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)

02-03 23:53:45.920: E/AndroidRuntime(4264): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)

02-03 23:53:45.920: E/AndroidRuntime(4264): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.Window.findViewById(int)' on a null object reference

02-03 23:53:45.920: E/AndroidRuntime(4264): at android.app.Activity.findViewById(Activity.java:2071)

02-03 23:53:45.920: E/AndroidRuntime(4264): at com.example.android.myapplication.MainActivity.(MainActivity.java:18)

02-03 23:53:45.920: E/AndroidRuntime(4264): at java.lang.reflect.Constructor.newInstance(Native Method)

02-03 23:53:45.920: E/AndroidRuntime(4264): at java.lang.Class.newInstance(Class.java:1572)

02-03 23:53:45.920: E/AndroidRuntime(4264): at android.app.Instrumentation.newActivity(Instrumentation.java:1065)

02-03 23:53:45.920: E/AndroidRuntime(4264): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2199)