I have this intent in the manifest file:
<activity
android:name=".ProductStrategyActivity"
android:label="@string/product_strategy_header" />
I get an Exception when I try to do this:
Intent myIntent = new Intent(LearnActivity.this, ProductStrategyActivity.class);
LearnActivity.this.startActivity(myIntent);
and the class is in a package that is in my src/com/app_name/content/ directory.
Could the problem be that I need to specify that directory in the manifest file?
Sorry I made a mistake in the exception. Here is the stack trace:
04-27 02:07:23.221: E/AndroidRuntime(1234): FATAL EXCEPTION: main
04-27 02:07:23.221: E/AndroidRuntime(1234): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.problemio/com.problemio.content.ProductStrategyActivity}; have you declared this activity in your AndroidManifest.xml?
04-27 02:07:23.221: E/AndroidRuntime(1234): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1508)
04-27 02:07:23.221: E/AndroidRuntime(1234): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1384)
04-27 02:07:23.221: E/AndroidRuntime(1234): at android.app.Activity.startActivityForResult(Activity.java:3190)
04-27 02:07:23.221: E/AndroidRuntime(1234): at android.app.Activity.startActivity(Activity.java:3297)
04-27 02:07:23.221: E/AndroidRuntime(1234): at com.problemio.LearnActivity$3.onClick(LearnActivity.java:113)
04-27 02:07:23.221: E/AndroidRuntime(1234): at android.view.View.performClick(View.java:3511)
04-27 02:07:23.221: E/AndroidRuntime(1234): at android.view.View$PerformClick.run(View.java:14105)
04-27 02:07:23.221: E/AndroidRuntime(1234): at android.os.Handler.handleCallback(Handler.java:605)
04-27 02:07:23.221: E/AndroidRuntime(1234): at android.os.Handler.dispatchMessage(Handler.java:92)
04-27 02:07:23.221: E/AndroidRuntime(1234): at android.os.Looper.loop(Looper.java:137)
04-27 02:07:23.221: E/AndroidRuntime(1234): at android.app.ActivityThread.main(ActivityThread.java:4424)
04-27 02:07:23.221: E/AndroidRuntime(1234): at java.lang.reflect.Method.invokeNative(Native Method)
04-27 02:07:23.221: E/AndroidRuntime(1234): at java.lang.reflect.Method.invoke(Method.java:511)
04-27 02:07:23.221: E/AndroidRuntime(1234): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
04-27 02:07:23.221: E/AndroidRuntime(1234): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
04-27 02:07:23.221: E/AndroidRuntime(1234): at dalvik.system.NativeStart.main(Native Method)
That line LearnActivity.java:113 is where I tell the current intent to go to the new one.
Thanks!
replace the above word in your manifeast file with below