Failing in starting a new activity(android)
<p>I'm trying to start a new activity but my app stop.
If the if condition is true then the register activity is executed and work but if false then the track activity stop my app
Here is the code:</p>

<pre><code>if(condition)
{
    Intent register = new Intent(HomeActivity.this, Register.class);
    HomeActivity.this.startActivity(register);
}
else
{
    Intent login = new Intent(HomeActivity.this, Track.class);
    HomeActivity.this.startActivity(login);
}
</code></pre>

<p>Maybe it's something with my Track class?</p>

<p>logcat:</p>

<pre><code>    12-21 15:46:16.265: D/AndroidRuntime(540): Shutting down VM
12-21 15:46:16.265: W/dalvikvm(540): threadid=1: thread exiting with uncaught exception (group=0x40c711f8)
12-21 15:46:16.265: E/AndroidRuntime(540): FATAL EXCEPTION: main
12-21 15:46:16.265: E/AndroidRuntime(540): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.android.location/com.example.android.location.HomeActivity}: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.android.location/com.example.android.location.Track}; have you declared this activity in your AndroidManifest.xml?
12-21 15:46:16.265: E/AndroidRuntime(540):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1970)
12-21 15:46:16.265: E/AndroidRuntime(540):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1995)
12-21 15:46:16.265: E/AndroidRuntime(540):  at android.app.ActivityThread.access$600(ActivityThread.java:128)
12-21 15:46:16.265: E/AndroidRuntime(540):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1161)
12-21 15:46:16.265: E/AndroidRuntime(540):  at android.os.Handler.dispatchMessage(Handler.java:99)
12-21 15:46:16.265: E/AndroidRuntime(540):  at android.os.Looper.loop(Looper.java:137)
12-21 15:46:16.265: E/AndroidRuntime(540):  at android.app.ActivityThread.main(ActivityThread.java:4514)
12-21 15:46:16.265: E/AndroidRuntime(540):  at java.lang.reflect.Method.invokeNative(Native Method)
12-21 15:46:16.265: E/AndroidRuntime(540):  at java.lang.reflect.Method.invoke(Method.java:511)
12-21 15:46:16.265: E/AndroidRuntime(540):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:993)
12-21 15:46:16.265: E/AndroidRuntime(540):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760)
12-21 15:46:16.265: E/AndroidRuntime(540):  at dalvik.system.NativeStart.main(Native Method)
12-21 15:46:16.265: E/AndroidRuntime(540): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.android.location/com.example.android.location.Track}; have you declared this activity in your AndroidManifest.xml?
12-21 15:46:16.265: E/AndroidRuntime(540):  at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1512)
12-21 15:46:16.265: E/AndroidRuntime(540):  at android.app.Instrumentation.execStartActivity(Instrumentation.java:1388)
12-21 15:46:16.265: E/AndroidRuntime(540):  at android.app.Activity.startActivityForResult(Activity.java:3281)
12-21 15:46:16.265: E/AndroidRuntime(540):  at android.app.Activity.startActivity(Activity.java:3388)
12-21 15:46:16.265: E/AndroidRuntime(540):  at com.example.android.location.HomeActivity.onCreate(HomeActivity.java:44)
12-21 15:46:16.265: E/AndroidRuntime(540):  at android.app.Activity.performCreate(Activity.java:4562)
12-21 15:46:16.265: E/AndroidRuntime(540):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1053)
12-21 15:46:16.265: E/AndroidRuntime(540):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1934)
12-21 15:46:16.265: E/AndroidRuntime(540):  ... 11 more
</code></pre>
