Android中的"Unable to start activity ComponentInfo"或者"Unable to instantiate activity ComponentInfo"的错误

这个错误"Unable to start activity ComponentInfo",从字面的意思看是无法启动某个activity组件,在运行过程中遇到了一个没在有功能配置文件中注册的activity,如果注册 了,则是注册路径错了,检查一下路径


还是就是

   requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.main);这样的布局显示的顺序的反过来了,如设置全屏啊,设置标题啊,setContentView(R.layout.main)这句一定要放到这类代码的后面,

要不就会报12-13 09:22:14.108: E/AndroidRuntime(9627): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.stone.listviewfirst/com.stone.listviewfirst.Listview_firstActivity}: android.util.AndroidRuntimeException: requestFeature() must be called before adding content

12-13 09:22:14.108: E/AndroidRuntime(9627): Caused by: android.util.AndroidRuntimeException: requestFeature() must be called before adding content


你可能感兴趣的:(Android中的"Unable to start activity ComponentInfo"或者"Unable to instantiate activity ComponentInfo"的错误)