This is my splash screen activity im trying to display a particular image for a period of time and when it is supposed to go to the second class it gives me an error as no classdeffounderror
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.layoutt1);
mSplashThread = new Thread() {
@Override
public void run() {
try {
while (shouldContinue) {
synchronized (this) {
// Wait given period of time or exit on touch
wait(5000);
shouldContinue = false;
}
}
} catch (InterruptedException ex) {
} finally {
finish();
// Run next activity
Intent intent = new Intent(getApplicationContext(),MainActivity.class);
startActivity(intent);
shouldContinue = false;
// stop();
}
}
};
mSplashThread.start();
}
My logcat shows
06-10 14:38:00.450: E/AndroidRuntime(5853): java.lang.NoClassDefFoundError: com.bara.fol.MainActivity
Could not find class 'com.bara.fol.MainActivity', referenced from method com.bara.fol.Main$1.run
and this is my manifest.xml present inside the application tag.
<activity
android:name=".Main"
android:label="@string/title_activity_main" >
<intent-filter
android:label="@string/app_name"
>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".MainActivity" ></activity>