Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Runtime Exception: Unable to instantiate activity componentInfo?

i am running a list-fragment program and at run-time i got the below error.

Error:

**02-09 09:03:40.213: ERROR/AndroidRuntime(572): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{ni.android.Fragment/ni.android.Fragment.Fragment}: java.lang.ClassNotFoundException: ni.android.Fragment.Fragment in loader dalvik.system.PathClassLoader[/data/app/ni.android.Fragment-1.apk]**

I don't know the reason.My program contains three classes- DetailsFragment.java, FragmentsTitles.java and Shakespear.java can any one help me out please....

like image 880
S.P Avatar asked Feb 09 '11 09:02

S.P


1 Answers

At any time if you get an error stating Unable to instantiate activity ComponentInfo That means your code has some error. That error will be shown in log cat As Caused by:......... 1.Caused by: android.view.InflateException: Binary XML file line #13: Error inflating class fragment(This indicates that there is an error in xml and the activity has inflating problem. By this you can know what is the error and if you rectify that error then your problem will be solved.

like image 51
S.P Avatar answered Oct 21 '22 13:10

S.P