【遇见Android bug】requestFeature() must be called before adding content
2014-09-16 11:19
573 查看
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sinvideo.videodemo/com.sinvideo.videodemo.VideoDemoActivity}: android.util.AndroidRuntimeException: requestFeature() must be called before adding content
Caused by: android.util.AndroidRuntimeException: requestFeature() must be called before adding content
这个问题是的提示已经非常明确了,不管是采用注解还是setContentView,
像requestWindowFeature(Window.FEATURE_NO_TITLE);这种设置需要在内容添加之前执行.
个人的理解是因为只有先对窗体进行设置之后,系统再来绘制view。这是一种合理的处理方式。
Caused by: android.util.AndroidRuntimeException: requestFeature() must be called before adding content
这个问题是的提示已经非常明确了,不管是采用注解还是setContentView,
像requestWindowFeature(Window.FEATURE_NO_TITLE);这种设置需要在内容添加之前执行.
个人的理解是因为只有先对窗体进行设置之后,系统再来绘制view。这是一种合理的处理方式。
相关文章推荐
- Android异常:requestFeature() must be called before adding content产生原因
- android.util.AndroidRuntimeException: requestFeature() must be called before adding content
- android.util.AndroidRuntimeException: requestFeature() must be called before adding content
- android.util.AndroidRuntimeException: requestFeature() must be called before adding content
- android.util.AndroidRuntimeException: requestFeature() must be called before adding content
- android.util.AndroidRuntimeException: requestFeature() must be called before adding content解决办法
- android.util.AndroidRuntimeException: requestFeature() must be called before adding content
- (Android开发)异常错误:requestFeature() must be called before adding content
- android.util.AndroidRuntimeException: requestFeature() must be called before adding content
- android.util.AndroidRuntimeException: requestFeature() must be called before adding content
- android.util.AndroidRuntimeException: requestFeature() must be called before adding content
- android.util.AndroidRuntimeException: requestFeature() must be called before adding content
- [Android]requestFeature() must be called before adding content
- android异常信息:requestFeature() must be called before adding content
- 调用顺序正确,仍然出现Android异常:requestFeature() must be called before adding content
- [Android]android.util.AndroidRuntimeException: requestFeature() must be called before adding content
- android.util.AndroidRuntimeException: requestFeature() must be called before adding content
- Android开发中遇到的requestFeature() must be called before adding content异常
- AndroidRuntimeException: requestFeature() must be called before adding content异常解决办法
- Android异常:requestFeature() must be called before adding content解决办法