Hi, I'm getting this error when deploying preview ...
# compose
s
Hi, I'm getting this error when deploying preview Composable to device
androidx.compose.ui.tooling.preview.PreviewActivity is not an Activity subclass or alias
is it a known issue ? using compose 1.0.0-rc02
Android Studio Arctic Fox | 2020.3.1 RC 1 Build #AI-203.7717.56.2031.7557721, built on July 17, 2021 Runtime version: 11.0.10+0-b96-7281165 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 10.15.5 GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 4 Registry: external.system.auto.import.disabled=true Non-Bundled Plugins: wu.seal.tool.jsontokotlin, com.developerphil.adbidea
g
Upgrade your
androidx.compose.ui:ui-tooling
to 1.0.0-rc02 too
s
Yeah already did that still the same issue.
g
Forgive me for insisting, but is there a chance that specifically
ui-tooling
is still hardcoded to e.g. 1.0.0-beta09 and doesn't use 1.0.0-rc02? Is that's not the case, then maybe a clean & rebuild of the project will help.
s
@George Kylafas Yeah I just recheck it's 1.0.0-rc02 and also clean rebuild still no luck 😞
g
If it's any consolation, at some point I started getting
androidx.compose.ui.tooling.PreviewActivity is not an Activity subclass or alias
errors. Note 1: AS 2020.3.1 RC1, Compose 1.0.0-rc02 Note 2: Our error messages are different, yours has an extra
.preview
s
Did you manage to resolve this issue?
g
No, I still get the same error... Did you have any luck?
I was trying to deploy Composables with AS's gutter icon to the left, or the respective keyboard shortcut (Ctrl-Shift-F10 for me) with no luck. But then I tried with the deploy icon in the preview pane and it worked. 🤦‍♂️ Previews also started getting rendered correctly too. I don't know what's the different but at least it worked.
s
Yeah, preview in AS is working for me as well but deploying preview Composable is not on latest Canary as well as on RC.
g
I noticed that preview deploy works when deploying to an API 30 image
👍 1
v
Happened to me too, filed an issue: https://issuetracker.google.com/issues/194625544
👍 2