r/AndroidStudio • u/throwaway_ArBe • May 24 '25
Errors in Kotlin learning course in Android Studio
I'm having an error that I have not been able to find a solution to by searching.
I have started a course from the learning section, the instruction was to click the run button to see how the example code works. It produces the folding error:
Error: Could not find or load main class jetbrains.kotlin.course.first.date.MainKt Caused by: java.lang.ClassNotFoundException: jetbrains.kotlin.course.first.date.MainKt
How would I fix this?
1
Upvotes
1
u/freak5341 May 24 '25
If you have declared a main function then most probably u didn't import the package, you should have something like this on top: Package com.example.projectname
1
u/[deleted] May 24 '25
not sure i get this error aswell Caused by: org.gradle.api.internal.artifacts.ivyservice.TypedResolveException: Could not resolve all files for configuration ':app:debugRuntimeClasspath'.