diff --git a/tools/layoutlib/bridge/src/android/view/Choreographer_Delegate.java b/tools/layoutlib/bridge/src/android/view/Choreographer_Delegate.java index 6cd67c6846f49..381eb1f509738 100644 --- a/tools/layoutlib/bridge/src/android/view/Choreographer_Delegate.java +++ b/tools/layoutlib/bridge/src/android/view/Choreographer_Delegate.java @@ -71,6 +71,7 @@ public class Choreographer_Delegate { public static void dispose() { try { Field threadInstanceField = Choreographer.class.getDeclaredField("sThreadInstance"); + threadInstanceField.setAccessible(true); @SuppressWarnings("unchecked") ThreadLocal threadInstance = (ThreadLocal) threadInstanceField.get(null); threadInstance.remove();