I am trying to learn android programming and I am creating an app that starts with a splash screen and loads a menu class after that. the problem is I get this exception
06-04 10:59:37.166: E/AndroidRuntime(926): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.em.example1.MENU" on path: /data/app/com.em.example1-1.apk
I understand what the exception states but I do not understand why this is happening. In my splash screen class I load the Menu activity like this
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
Thread timer = new Thread() {
public void run() {
try {
sleep(5000);
} catch (InterruptedException e) {
e.printStackTrace();
} finally {
Intent mainApp = new Intent("com.em.example1.MENU");
startActivity(mainApp);
}
}
};
timer.start();
and the menu class is defined in the manifest file like this
<activity
android:name="com.em.example1.MENU"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.em.example1.MENU" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
When i was loading a main activity with two buttons and a label everything was working ok. But when I changed it (inside my splash screen activity) so it would load Menu Activity it keeps giving me this error.
Thanks in advance