java.util.concurrent.TimeoutException

Preview timed out while rendering the layout. This typically happens when there is an infinite loop or unbounded recursion in one of the custom views.

Hot problem!

This exception has a lot of traffic. You can help 12 users by writing a short tip.


Solutions on the web1185

Solution icon of stackoverflow
via Stack Overflow by Shubham Singh
, 9 months ago
Preview timed out while rendering the layout. This typically happens when there is an infinite loop or unbounded recursion in one of the custom views.

Solution icon of stackoverflow
Preview timed out while rendering the layout. This typically happens when there is an infinite loop or unbounded recursion in one of the custom views.

Solution icon of github
Preview timed out while rendering the layout. This typically happens when there is an infinite loop or unbounded recursion in one of the custom views.

Solution icon of stackoverflow
Preview timed out while rendering the layout. This typically happens when there is an infinite loop or unbounded recursion in one of the custom views.

Solution icon of stackoverflow
Preview timed out while rendering the layout. This typically happens when there is an infinite loop or unbounded recursion in one of the custom views.

Solution icon of web
Preview timed out while rendering the layout. This typically happens when there is an infinite loop or unbounded recursion in one of the custom views.

Solution icon of stackoverflow
Preview timed out while rendering the layout. This typically happens when there is an infinite loop or unbounded recursion in one of the custom views.

Solution icon of github
Preview timed out while rendering the layout... .... ...

Solution icon of googlegroups
via Google Groups by Zhang, Charles, 1 year ago
Timeout while waiting for workers when flushing pool zootopia.ltb Index; current timeout is 300000 millis, consider increasing it, or reducing load on the node. Failure to flush may cause excessive growth of Cassandra commit log.

Solution icon of stackoverflow
via Stack Overflow by Vincent D.
, 8 months ago
Test timed out while waiting for an expected result

Stack trace

  • java.util.concurrent.TimeoutException: Preview timed out while rendering the layout. This typically happens when there is an infinite loop or unbounded recursion in one of the custom views. at java.util.ArrayList.indexOf(ArrayList.java:317) at java.util.ArrayList.contains(ArrayList.java:300) at com.android.layoutlib.bridge.impl.DelegateManager.addNewDelegate(DelegateManager.java:132) at android.graphics.drawable.VectorDrawable_Delegate.nCreateTree(VectorDrawable_Delegate.java:94) at android.graphics.drawable.VectorDrawable.nCreateTree(VectorDrawable.java) at android.graphics.drawable.VectorDrawable.access$300(VectorDrawable.java:204) at android.graphics.drawable.VectorDrawable$VectorDrawableState.createNativeTree(VectorDrawable.java:824) at android.graphics.drawable.VectorDrawable$VectorDrawableState.access$000(VectorDrawable.java:761) at android.graphics.drawable.VectorDrawable.inflate(VectorDrawable.java:581) at android.graphics.drawable.DrawableInflater.inflateFromXml(DrawableInflater.java:130) at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:1224) at android.graphics.drawable.Drawable.createFromXml(Drawable.java:1197) at com.android.layoutlib.bridge.impl.ResourceHelper.getDrawable(ResourceHelper.java:316) at android.content.res.Resources_Delegate.getDrawable(Resources_Delegate.java:142) at android.content.res.Resources.getDrawable(Resources.java:763) at android.graphics.drawable.AnimatedVectorDrawable.inflate(AnimatedVectorDrawable.java:373) at android.graphics.drawable.DrawableInflater.inflateFromXml(DrawableInflater.java:130) at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:1224) at android.graphics.drawable.Drawable.createFromXml(Drawable.java:1197) at com.android.layoutlib.bridge.impl.ResourceHelper.getDrawable(ResourceHelper.java:316) at android.content.res.BridgeTypedArray.getDrawable(BridgeTypedArray.java:687) at android.graphics.drawable.AnimatedStateListDrawable.parseTransition(AnimatedStateListDrawable.java:473) at android.graphics.drawable.AnimatedStateListDrawable.inflateChildElements(AnimatedStateListDrawable.java:455) at android.graphics.drawable.AnimatedStateListDrawable.inflate(AnimatedStateListDrawable.java:385) at android.graphics.drawable.DrawableInflater.inflateFromXml(DrawableInflater.java:130) at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:1224) at android.graphics.drawable.Drawable.createFromXml(Drawable.java:1197) at com.android.layoutlib.bridge.impl.ResourceHelper.getDrawable(ResourceHelper.java:316) at android.content.res.Resources_Delegate.getDrawable(Resources_Delegate.java:142) at android.content.res.Resources.getDrawable(Resources.java:763) at android.support.v7.widget.ResourcesWrapper.getDrawable(ResourcesWrapper.java:133) at android.content.Context.getDrawable(Context.java:525) at android.support.v4.content.ContextCompatApi21.getDrawable(ContextCompatApi21.java:26) at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:352) at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:193) at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:181) at android.support.v7.widget.AppCompatCompoundButtonHelper.loadFromAttributes(AppCompatCompoundButtonHelper.java:64) at android.support.v7.widget.AppCompatCheckBox.<init>(AppCompatCheckBox.java:61) at android.support.v7.widget.AppCompatCheckBox.<init>(AppCompatCheckBox.java:54) at sun.reflect.GeneratedConstructorAccessor363.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.jetbrains.android.uipreview.ViewLoader.createNewInstance(ViewLoader.java:465) at org.jetbrains.android.uipreview.ViewLoader.loadClass(ViewLoader.java:172) at org.jetbrains.android.uipreview.ViewLoader.loadView(ViewLoader.java:105) at com.android.tools.idea.rendering.LayoutlibCallbackImpl.loadView(LayoutlibCallbackImpl.java:186) at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:312) at android.view.BridgeInflater.onCreateView(BridgeInflater.java:141) at android.view.LayoutInflater.onCreateView(LayoutInflater.java:717) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:785) at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:210) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727) at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:858) at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70) at android.view.LayoutInflater.rInflate(LayoutInflater.java:834) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:861) at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70) at android.view.LayoutInflater.rInflate(LayoutInflater.java:834) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821) at android.view.LayoutInflater.inflate(LayoutInflater.java:518) at android.view.LayoutInflater.inflate(LayoutInflater.java:397) at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:317) at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:429) at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:389) at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:548) at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:533) at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:966) at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:533) at com.android.tools.idea.rendering.RenderTask.lambda$inflate$61(RenderTask.java:659)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.