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:
Luis Fer García
04/05/2021, 3:54 PM
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
Luis Fer García
04/05/2021, 3:56 PM
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
Luis Fer García
04/05/2021, 3:58 PM
Does anyone knows what I'm missing here?
Luis Fer García
04/05/2021, 4:32 PM
🤦♂️ My build.graddle was missing the correct Kotlin version. My bad.