kotlin gradle dsl: type mismatch, expected java.lang.string but inferred type is kotlin.string

Answered

I have tried lots of  other things like cache invalidation, even intellij reinstallation. however issue persists. I have captured the details at https://stackoverflow.com/questions/54754528/expected-java-lang-string-found-kotlin-string-error-in-kotlin-gradle-in-intell

 

IF you could please look at it and help me out.

 

6 comments
Comment actions Permalink

Its solved. please see the link.

0
Comment actions Permalink

Installing a different JDK is unfortunately not a workaround for me.  I am experiencing the same issue.  A real show stopper for me; as I am investing a lot of time to switch to Kotlin Gradle builld but now seeming there is Java/Gradle plugins that simply does not play nice.

0
Comment actions Permalink

@Gawie Kellerman please file a bug at https://youtrack.jetbrains.com/issues/KT with the sample project attached and screenshot of the error.

0
Comment actions Permalink

Hi Andrey.  I have filed a problem and fixed the problem myself.  The warnings were a bit misleading at first...  but sorted it out.  Thank you.  Nothing to do with the version of JDK...  it was environment setup that was wrong in for gradle in my instance.

0
Comment actions Permalink

Hi Gawie, what was the environment setup for Gradle that was wrong? I am seeing the same errors in IntelliJ.

0
Comment actions Permalink

I ended up manually deleting IntelliJ cache folders. After that everything worked again.

~/Library/Caches/JetBrains/<product><version> on macOS
~/.cache/JetBrains/<product><version> on Linux
%LOCALAPPDATA%\JetBrains\<product><version> on Windows
0

Please sign in to leave a comment.