2015-06-21 86 views
3

我遇到了渲染問題java.lang.StackOverflowError。我將堆棧與主要的xml代碼一起復制到剪貼板。剪貼板中的內容部分是:創建片段時java.lang.StackOverflowError

java.lang.StackOverflowError 
    at android.view.RenderNode.<init>(RenderNode.java:174) 
    at android.view.RenderNode.create(RenderNode.java:196) 
    at android.view.View.<init>(View.java:3591) 
    at android.view.View.<init>(View.java:3682) 
    at android.view.ViewGroup.<init>(ViewGroup.java:497) 
    at android.widget.RelativeLayout.<init>(RelativeLayout.java:248) 
    at android.widget.RelativeLayout.<init>(RelativeLayout.java:244) 
    at android.widget.RelativeLayout.<init>(RelativeLayout.java:240) 
    at sun.reflect.GeneratedConstructorAccessor303.newInstance(Unknown Source) 
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
    at java.lang.reflect.Constructor.newInstance(Constructor.java:408) 
    at android.view.LayoutInflater.createView(LayoutInflater.java:607) 
    at android.view.BridgeInflater.onCreateView(BridgeInflater.java:93) 
    at android.view.LayoutInflater.onCreateView(LayoutInflater.java:682) 
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:741) 
    at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:138) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:117) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:858) 
    at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:802) 
    at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:64) 
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:782) 
    at android.view.LayoutInflater_Delegate.parseInclude(LayoutInflater_Delegate.java:154) 

的main_activity.xml代碼: -

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" 
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin" 
android:paddingRight="@dimen/activity_horizontal_margin" 
android:paddingTop="@dimen/activity_vertical_margin" 
android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity" 
android:id="@+id/layout1"> 

<fragment 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:name="com.example.paramjeet.memegenerator.TopSection" 
    android:id="@+id/fragment" 
    android:layout_alignParentTop="true" 
    android:layout_centerHorizontal="true" 
    tools:layout="@layout/fragment" /> 

TopSection.java

package com.example.paramjeet.memegenerator; 

import android.app.Fragment; 
import android.os.Bundle; 
import android.view.LayoutInflater; 
import android.view.View; 
import android.view.ViewGroup; 

public class TopSection extends Fragment { 
@Override 
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { 
View view = inflater.inflate(R.layout.fragment,container,false); 
return view; 
    } 
} 

fragment.xml之

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" android:layout_height="match_parent" 
    > 

    <EditText 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:id="@+id/toptext" 
     android:layout_marginTop="25dp" 
     android:width="250dp" 
     android:layout_centerHorizontal="true" 
     android:inputType="text" /> 

    <EditText 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:id="@+id/bottomtext" 
     android:layout_marginTop="25dp" 
     android:width="250dp" 
     android:layout_centerHorizontal="true" 
     android:layout_below="@id/toptext" 
     android:inputType="text" /> 

    <Button 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="@string/button_res" 
     android:id="@+id/button1" 
     android:layout_below="@+id/bottomtext" 
     android:layout_centerHorizontal="true" 
     android:layout_marginTop="25dp" /> 

</RelativeLayout> 

請幫忙。

+1

你的片段使用什麼佈局? – SqueezyMo

+0

我使用了相對佈局 –

+0

你可以展示如何誇大它(你的'TopSection.onCreateView()'方法)? – SqueezyMo

回答

4

您可以在堆棧跟蹤中看到LayoutInflater是遞歸調用的。所以看起來好像在它包含遞歸自己的佈局的片段的佈局中存在錯誤。

如果您也發佈片段的佈局,我將能夠告訴您更多信息。

+0

您的意思是fragment.xml文件代碼? –

+0

這正是我所需要的:) –

相關問題