I cloned a repository of android composable app(https://github.com/android/compose-samples/blob/main/Jetsnack), ran it in android studio and it worked fine.
Then I created a new project, tried copying plugins in build.gradle.kts(Module:app) and sync the project, I get this error ->
Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:public val <T : Any> Class<TypeVariable(T)>.kotlin: KClass<TypeVariable(T)> defined in kotlin.jvm
When I tried copying dependencies in build.gradle.kts(Project), I get this error ->
Unresolved reference: iconsExtended, for implementation(libs.androidx.compose.material.iconsExtended) (It worked fine in the cloned app)
Why do I get error for dependencies?
Also if I try adding material dependency
libs.androidx.compose.material
when the default was material3
libs.androidx.material3
android-studio can not load the material package even after removing material3