If you have this error “Unable to instantiate activity ComponentInfo” in the LogCat of Android just you launch your app, first you have to check the file AndroidManifest.xml especially the code lines
- package=”[your package]”
it is an attribute of the tag manifest and you insert a unique name for your app in java package style, for example com.example.myapp (see here) - android:name=”.[your activity]”
it is an attribute of the tag activity and you insert the class name that implements the activity (see here)
These are the main points that you find on the internet to resolve the error “Unable to instantiate activity ComponentInfo” but it is possible that this exception is also caused by a lack of or incorrect setting in the Java Build Path of your project (see the figure)
In my project I had to add the folder libs containing the file android-support-v4.jar (Support Library).
Leave a Reply