So this question has been asked like a zillion tim...
# compose
a
So this question has been asked like a zillion times, but let me ask it again, what's up with
androidx.compose.ui.tooling.PreviewActivity is not an Activity subclass or alias
.?? I am on the latest stable version of everything, • Compose 1.0.1 • AGP 7.0.2 • Kotlin 1.5.21 • Android Studio Arctic Fox Patch 1 ...and still this issue is coming. What's up with that. And how do I fix it.?? Its so annoying. And why does making a duplication Run Configuration of the same just works perfectly fine.??
👀 2
🤯 1
a
I think you might have a dependency conflict on `ui-tooling`or
androidx.activity
, check your dependencies
a
Hii @allan.conda Yes, I do have the following dependencies:
Copy code
implementation("androidx.activity:activity-compose:1.3.1")
debugImplementation("androidx.compose.ui:ui-tooling:1.0.1")
Could you please elaborate what seems to be the issue here and how do I resolve it.??
a
you could just use `implementation`instead of
debugImplementation
then check
./gradlew app:dependencies
to check if you are getting different versions for the same dependencies
a
What am I even looking for.? I ran the command and checked the compose ui-tooling and androidx.activity dependencies, there are no conflict for ui-tooling, androix.activity seems to have different versions in different dependencies but they are changed to 1.3.1 since its been explicitly defined.
a
I’m getting errors in IDE only (Building fine) due to differences like that. Even if it says the dependency changes to 1.3.1, I think IDE gets confused. You can check by ctrl+clicking the class showing the error, and check the version of the class being used in that code if it open the source for the latest one or the old one