无法使用 Arctic Fox Stable 部署 Compose 预览 [英] Can Not Deploy Compose Preview with Arctic Fox Stable

查看:27
本文介绍了无法使用 Arctic Fox Stable 部署 Compose 预览的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试部署预览时出现此错误:

I get this error when trying to deploy preview:

androidx.compose.ui.tooling.preview.PreviewActivity is not an Activity subclass or alias

我在新的干净项目或旧项目中都遇到了这个错误.这是我使用的:

I got this error in both new clean project or old project. Here is what i use:

  • AGP:7.0.0 和 7.1.0-alpha03 不起作用.
  • Kotlin:1.5.10 撰写:1.0.0
  • compileSdk 和 targetSdk:30 和 31 都不起作用
  • 尝试将工具与 tooling-preview 和只使用 tooling-preview 一起使用,两者都不起作用.

推荐答案

我也遇到了这个问题,当运行/预览Hello"这样简单的事情时看到庆祝活动非常令人沮丧模板失败

i got this too, very frustrating to see celebration when something so simple as running/previewing "Hello" template fails

这篇关于无法使用 Arctic Fox Stable 部署 Compose 预览的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆