NOTE: This issue has been resolved since Kotlin 1.0 beta version (at least). Keeping the rest of the contents intact for historical reason.
I'm using Kotlin with Android and I'm trying to use some constants from the SDK, like this one:
MediaRecorder.AudioSource.MIC;
It doesn't see AudioSource, so it doesn't see the MIC as well. I've tried changing the imports, cleaning the project. Nothing worked so far. I've temporarily solved it by importing it in a Java class, which worked just fine, and then I just refer to my Java class from my Kotlin file,but I would really like to know why this happens and how I can avoid having that Java class.