Thread
#compose
    Ashu

    Ashu

    1 year ago
    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.??
    a

    allan.conda

    1 year ago
    I think you might have a dependency conflict on ui-toolingor
    androidx.activity
    , check your dependencies
    Ashu

    Ashu

    1 year ago
    Hii @allan.conda Yes, I do have the following dependencies:
    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

    allan.conda

    1 year ago
    you could just use implementationinstead of
    debugImplementation
    then check
    ./gradlew app:dependencies
    to check if you are getting different versions for the same dependencies
    Ashu

    Ashu

    1 year ago
    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

    allan.conda

    1 year ago
    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