title: Android Studio compose preview not working
body: <p>I can't preview any composables with Android Studio Arctic Fox Beta 4. Even the default one that is generated with an empty compose project. Running the default app on a hardware device doesn't work either
  Here is the stack trace:</p>
  <pre><code>java.lang.NoSuchMethodError: 'androidx.compose.ui.text.TextStyle androidx.compose.ui.text.TextStyle.copy-H99Ercs$default(androidx.compose.ui.text.TextStyle, long, long, androidx.compose.ui.text.font.FontWeight, androidx.compose.ui.text.font.FontStyle, androidx.compose.ui.text.font.FontSynthesis, androidx.compose.ui.text.font.FontFamily, java.lang.String, long, androidx.compose.ui.text.style.BaselineShift, androidx.compose.ui.text.style.TextGeometricTransform, androidx.compose.ui.text.intl.LocaleList, long, androidx.compose.ui.text.style.TextDecoration, androidx.compose.ui.graphics.Shadow, androidx.compose.ui.text.style.TextAlign, androidx.compose.ui.text.style.TextDirection, long, androidx.compose.ui.text.style.TextIndent, int, java.lang.Object)'
      at androidx.compose.material.TypographyKt.withDefaultFontFamily(Typography.kt:284)
      at androidx.compose.material.TypographyKt.access$withDefaultFontFamily(Typography.kt:1)
      at androidx.compose.material.Typography.&lt;init&gt;(Typography.kt:186)
      at androidx.compose.material.Typography.&lt;init&gt;(Typography.kt:118)
      at com.example.widgettest.ui.theme.TypeKt.&lt;clinit&gt;(Type.kt:10)
      at com.example.widgettest.ui.theme.ThemeKt.WidgetTestTheme(Theme.kt:40)
      at com.example.widgettest.MainActivityKt.DefaultPreview(MainActivity.kt:35)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      at androidx.compose.ui.tooling.preview.PreviewUtilsKt.invokeComposableMethod(PreviewUtils.kt:141)
      at androidx.compose.ui.tooling.preview.PreviewUtilsKt.invokeComposableViaReflection(PreviewUtils.kt:180)
      at androidx.compose.ui.tooling.preview.ComposeViewAdapter$init$3$1$composable$1.invoke(ComposeViewAdapter.kt:545)
      at androidx.compose.ui.tooling.preview.ComposeViewAdapter$init$3$1$composable$1.invoke(ComposeViewAdapter.kt:543)
      at androidx.compose.ui.tooling.preview.ComposeViewAdapter$init$3$1.invoke(ComposeViewAdapter.kt:582)
      at androidx.compose.ui.tooling.preview.ComposeViewAdapter$init$3$1.invoke(ComposeViewAdapter.kt:538)
      at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
      at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
      at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:215)
      at androidx.compose.ui.tooling.InspectableKt.Inspectable(Inspectable.kt:64)
      at androidx.compose.ui.tooling.preview.ComposeViewAdapter$WrapPreview$1.invoke(ComposeViewAdapter.kt:487)
      at androidx.compose.ui.tooling.preview.ComposeViewAdapter$WrapPreview$1.invoke(ComposeViewAdapter.kt:486)
      at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
      at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
      at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:215)
      at androidx.compose.ui.tooling.preview.ComposeViewAdapter.WrapPreview(ComposeViewAdapter.kt:486)
      at androidx.compose.ui.tooling.preview.ComposeViewAdapter.access$WrapPreview(ComposeViewAdapter.kt:112)
      at androidx.compose.ui.tooling.preview.ComposeViewAdapter$init$3.invoke(ComposeViewAdapter.kt:538)
      at androidx.compose.ui.tooling.preview.ComposeViewAdapter$init$3.invoke(ComposeViewAdapter.kt:535)
      at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
      at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
      at androidx.compose.ui.platform.ComposeView.Content(ComposeView.android.kt:384)
      at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:228)
      at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:227)
      at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
      at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
      at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:215)
      at androidx.compose.ui.platform.CompositionLocalsKt.ProvideCommonCompositionLocals(CompositionLocals.kt:148)
      at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:114)
      at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:113)
      at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
      at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
      at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:215)
      at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt.ProvideAndroidCompositionLocals(AndroidCompositionLocals.android.kt:106)
      at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$3.invoke(Wrapper.android.kt:162)
      at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$3.invoke(Wrapper.android.kt:161)
      at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
      at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
      at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:215)
      at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:161)
      at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:144)
      at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
      at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
      at androidx.compose.runtime.ComposerKt.invokeComposable(Composer.kt:3324)
      at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:2575)
      at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:2571)
      at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(SnapshotState.kt:523)
      at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:2564)
      at androidx.compose.runtime.ComposerImpl.composeContent$runtime_release(Composer.kt:2515)
      at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:476)
      at androidx.compose.runtime.Recomposer.composeInitial$runtime_release(Recomposer.kt:727)
      at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:432)
      at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:144)
      at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:135)
      at androidx.compose.ui.platform.AndroidComposeView.setOnViewTreeOwnersAvailable(AndroidComposeView.android.kt:724)
      at androidx.compose.ui.platform.WrappedComposition.setContent(Wrapper.android.kt:135)
      at androidx.compose.ui.platform.WrappedComposition.onStateChanged(Wrapper.android.kt:187)
      at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.java:354)
      at androidx.lifecycle.LifecycleRegistry.addObserver(LifecycleRegistry.java:196)
      at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:142)
      at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:135)
      at androidx.compose.ui.platform.AndroidComposeView.onAttachedToWindow(AndroidComposeView.android.kt:811)
      at android.view.View.dispatchAttachedToWindow(View.java:20479)
      at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3489)
      at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3496)
      at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3496)
      at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3496)
      at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3496)
      at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3496)
      at android.view.AttachInfo_Accessor.setAttachInfo(AttachInfo_Accessor.java:44)
      at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:360)
      at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:431)
      at com.android.tools.idea.layoutlib.LayoutLibrary.createSession(LayoutLibrary.java:141)
      at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:714)
      at com.android.tools.idea.rendering.RenderTask.lambda$inflate$7(RenderTask.java:870)
      at com.android.tools.idea.rendering.RenderExecutor$runAsyncActionWithTimeout$2.run(RenderExecutor.kt:187)
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      at java.base/java.lang.Thread.run(Thread.java:834)
  </code></pre>