Click here to Skip to main content
15,887,477 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hello

i created two Xml activities. One is for the activity interface layout and another one is the for the coordinator layout.I added the include layout for the interface layout activity into the coordinator layout and i cant see my interface layout from the preview.
the previeW is blank and these are the errors they are showing me

*************************************************

Error 1: RENDER PROBLEMS

<item> tag requires a 'drawable' attribute or child tag defining a drawable
_______________________________________________________________________________

Error 2: can't make a decor toolbar out of relative layout

java.lang.IllegalStateException: Can't make a decor toolbar out of RelativeLayout
at android.support.v7.widget.ActionBarOverlayLayout.getDecorToolbar(ActionBarOverlayLayout.java:549)
at android.support.v7.widget.ActionBarOverlayLayout.pullChildren(ActionBarOverlayLayout.java:538)
at android.support.v7.widget.ActionBarOverlayLayout.onMeasure_Original(ActionBarOverlayLayout.java:339)
at android.support.v7.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java)
at android.view.View.measure_Original(View.java:22071)
at android.view.View_Delegate.measure(View_Delegate.java:80)
at android.view.View.measure(View.java:22035)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461)
at android.view.View.measure_Original(View.java:22071)
at android.view.View_Delegate.measure(View_Delegate.java:80)
at android.view.View.measure(View.java:22035)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.measureView(RenderSessionImpl.java:590)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:343)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:384)
at com.android.tools.idea.layoutlib.LayoutLibrary.createSession(LayoutLibrary.java:193)
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:544)
at com.android.tools.idea.rendering.RenderTask.lambda$inflate$3(RenderTask.java:678)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

What I have tried:

I have tried to change the theme to appCompact
Posted
Updated 29-Mar-18 20:42pm
Comments
David Crow 31-Mar-18 8:37am    
"...i cant see my interface layout from the preview."

But more importantly, does the layout render correctly on a device?
Member 13638713 31-Mar-18 9:03am    
i haven't yet tried it,let me check

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900