Android中的"Unable to start activity ComponentInfo"或者"Unable to instantiate activity ComponentInfo"的错误
2011-12-02 13:09
555 查看
这个错误"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
还是就是
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"的错误
- Android中的"Unable to start activity ComponentInfo"或者"Unable to instantiate activity ComponentInfo"的错误
- 关于android中的” unable to instantiate activity componentinfo"的错误
- Android中的"Unable to start activity ComponentInfo"错误
- android Unable to instantiate activity ComponentInfo & cocos jni操作ui
- Android开发中java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx}: java.lang.NullPointerException 错误的集中原因及解决办法
- Android开发中java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx}: java.lang.NullPointerException 错误的集中原因及解决办法
- 解决Android错误Unable to instantiate activity ComponentInfo
- 【学习Android遇到的错误】关于Unable to instantiate activity ComponentInfo错误解决方案
- android中使用fragment时出现如下错误 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.fra
- android工程导入没有错误,运行提示Unable to instantiate activity ComponentInfo
- [unity移植android]Unable to instantiate activity ComponentInfo
- 【Android开发】java.lang.RuntimeException: Unable to instantiate activity ComponentInfo
- Android开发中java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx}: java.lang.NullPoi
- Android开发中java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx}: java.lang.NullPoi
- Unable to start activity ComponentInfo{…}: android.content.res.Resources$NotFoundException: Resource
- Android开发,实例化异常,java.lang.RuntimeException: Unable to instantiate activity ComponentInfo
- Android开发中java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx}: java.lang.NullPoi
- unable to start activity componentinfo,android.view.InflateException
- Unable to instantiate activity ComponentInfo错误