Tuesday, May 15, 2012

Unable to instantiate activity in android

Most times this error has to do with the Manifest.xml file.

My advice is first to check  the Main Activity name if is the same with the Activity you use in your code:
<activity android:name=".MainActivity" />

And then check if your package got the same name as you named it when you create the Project.
You can find "package" property inside :
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="" >

It's a common mistake if you import your project code from another project or you change the main activity name.

No comments:

Post a Comment