There are three scenarios in which activity cannot be instantiated:
1. The activity has not been registered in the manifest.xml manifest, or the class name of the package name or activity has been modified after the activity has been created, and the configuration manifest has not been modified to create an instantiation.
2. Create a new package yourself, and the default package is still used when registering, for example, the default package is Com.ghg.Dao package, you create a new Com.ghg.DaoImpl package, and write a firstactivity in this package, when you register in Manifest.xml you write <activity android:name= ". Firstactivity "/>, at this time the equivalent of your class registered to the default package, the system is not found in the default package, because your firstactivity under the Com.ghg.DaoImpl package, so you should register as a package name plus class name, such as:< Activity android:name= "com.ghg.DaoImpl.FirstActivity" so that the system can find the corresponding class in the specified package.
3. It is also the case that your firstactivity is defined as an abstract class, which is not likely to be made by ordinary people.
If the above three cases are taken into account, and the exception is thrown, check to see if the class's constructors and OnCreate () are present in the activity class, and if so, then delete the constructor and put the initialization in
Try it in OnCreate ().
Turn http://blog.csdn.net/gaohongijj/article/details/8010869/
Java.lang.RuntimeException:Unable to instantiate activity ComponentInfo exception resolution