https://kotlinlang.org logo
#getting-started
Title
# getting-started
l

Luis Fer García

04/05/2021, 3:54 PM
Hello everyone! I'm new with Kotlin, I'm trying to use Calendar class and I'm having some issues. I'll explain in thread:
If I import the Kotlin class:
import android.icu.util.Calendar
And I'm trying to use it like this:
Copy code
var cal = Calendar.getInstance()
I get this error:
Cannot access 'kotlin.Cloneable' which is a supertype of 'android.icu.util.Calendar'. Check your module classpath for missing or conflicting dependencies
The same happens when I'm using the Java class
import java.util.Calendar
Cannot access 'kotlin.Cloneable' which is a supertype of 'java.util.Calendar'. Check your module classpath for missing or conflicting dependencies
Does anyone knows what I'm missing here?
🤦‍♂️ My build.graddle was missing the correct Kotlin version. My bad.
rubber duck 4
👍 3
2 Views