I want to start fragment activity in a textview click in activity class but I get below exception.I am new to android please help.This is my code
Intent intent=new Intent(this,ThreeFragment.class);
startActivity(intent);
and got below exception.
android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.siluni.myapplication/com.example.siluni.myapplication.ThreeFragment}; have you declared this activity in your AndroidManifest.xml?
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1791)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1513)
at android.app.Activity.startActivityForResult(Activity.java:3933)
at android.app.Activity.startActivityForResult(Activity.java:3881)
at android.app.Activity.startActivity(Activity.java:4204)
at android.app.Activity.startActivity(Activity.java:4172)
at com.example.siluni.myapplication.SheduleActivity.SaveShedule(SheduleActivity.java:178)
at com.example.siluni.myapplication.SheduleActivity$5.onClick(SheduleActivity.java:150)
at android.view.View.performClick(View.java:5076)
at android.view.View$PerformClick.run(View.java:20279)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5930)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
See Question&Answers more detail:os