我无法使用 Android Studio Arctic Fox Beta 4 预览任何可组合项。即使是使用空的 compose 项目生成的默认可组合项也是如此。在硬件设备上运行默认应用程序也不起作用这是堆栈跟踪:
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.<init>(Typography.kt:186)
at androidx.compose.material.Typography.<init>(Typography.kt:118)
at com.example.widgettest.ui.theme.TypeKt.<clinit>(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) …Run Code Online (Sandbox Code Playgroud) android android-studio android-jetpack-compose android-studio-4.0