android compose 预览编译失败

错误内容:
android compose 预览编译失败_第1张图片


The following classes could not be instantiated:
- androidx.compose.ui.tooling.ComposeViewAdapter (Open Class, Show Exception, Clear Cache)
 Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE.  If this is an unexpected error you can also try to build the project, then manually refresh the layout.  Exception Details java.lang.ClassNotFoundException: android.window.OnBackInvokedCallback   at java.lang.ClassLoader.loadClass(ClassLoader.java:589)   at java.lang.ClassLoader.loadClass(ClassLoader.java:522)   at androidx.compose.ui.tooling.ComposeViewAdapter$FakeOnBackPressedDispatcherOwner$1.<init>   ... (ComposeViewAdapter.kt:735)   at androidx.compose.ui.tooling.ComposeViewAdapter.<init>(ComposeViewAdapter.kt:734)   at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(NativeConstructorAccessorImpl.java:-2)   at jdk.internal.

你可能感兴趣的:(笔记,android,kotlin,开发语言)