Hi, first of all I’m new to kotlin and have little experience with Android Studio.
I’ve Android studio 2.3.1 and installed with kotlin plugin version 1.1.2-release-Studio-2.3-3.
I keep getting Kotlin not configured at the startup every time I re-open Android Studio. I noticed gradle automatically sync thus build the project every time. I believe that action causes Kotlin syntax sensing to be failed, and showed up with Kotin not configured error. This also forces me to manually click on sync gradle button to make the popup message disappears, and kotlin syntax sensing back to normal so no more reference error, and I can start coding.
I configured build.gradle with kotlinVersion = '1.1.2', and double checked that I have apply plugin: "kotlin" for top level and sub-project’ build.gradle file.
I’ve tested with 3 different projects, and only 1 of them which uses gradle version 3.x experiences the problem, other twos didn’t have such problem, and it’s pretty smooth. I think I move on from my own question for now. Thanks for your help by the way.
Can the documentation about using the plugins block be removed, or changed to actively discourage using that block? It does not prevent the “Kotlin not configured” message, and the plugin version is older than the current Kotlin version (see the Gradle plug-in page).
@nyagenox was simply following the instructions on the page of the official Gradle plug-in, and now you are saying he is giving the wrong advice. Maybe that page needs to be updated so users are directed to the correct instructions.
This line, try to change to classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion".
Possible problem is version mismatch to $kotlinVersion as you set it to be 1.1.4-2.
It;s 10th october and I still somehow jumped into that issue. Now 3rd hour trying to solve ‘Kotlin not configured’ → ‘There aren’t configurators available’. Googlin is not helping, just stucked. It’s so frustrating trying to code something and fighting with such a ridicoulus issues.
I am pissed off
And just noticed, that post has nearly 5000 VIEWS !!! I highly doubt that some people are coming here just to read gradle issues in their free time. So notice, how many people it affects, maybe it’s serious and needs little improvement?
Gradle, Android Studio 3, Interestingly it happens after sudden shutdown of my PC. But I imported project from Github as previously and now it’s shouting all the errors. I mean every Android class cannot be resolved etc.
it happens for newly generated project too
debug with --info, (skipped some things going well) :
Executing task ‘:app:compileDebugKotlin’ (up-to-date check took 0.013 secs) due to:
Task.upToDateWhen is false.
All input files are considered out-of-date for incremental task ‘:app:compileDebugKotlin’.
file or directory ‘D:\AppTimer\app\src\main\kotlin’, not found
file or directory ‘D:\AppTimer\app\src\debug\kotlin’, not found
file or directory ‘D:\AppTimer\app\src\main\kotlin’, not found
file or directory ‘D:\AppTimer\app\src\debug\kotlin’, not found
file or directory ‘D:\AppTimer\app\libs’, not found
file or directory ‘D:\AppTimer\app\libs’, not found
Using kotlin incremental compilation
[KOTLIN] deleting D:\AppTimer\app\build\tmp\kotlin-classes\debug on error
[KOTLIN] deleting D:\AppTimer\app\build\tmp\kotlin-classes\debug on error
:app:compileDebugKotlin (Thread[Task worker for ‘:’ Thread 2,5,main]) completed. Took 3.28 secs.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ‘:app:compileDebugKotlin’.
Compilation error. See log for more details
Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
Works now, worth pointing out that I had previously got rid of message when rechecking my ext.kotlin_version in gradle to be the same like the version of kotlin in android studio, however, unresolved stayed until applying @yole advice. Thanks again !
When I started my project a couple months ago it required me to update my Gradle version (I had version 4.10.2). So I updated it to v6.0.1 (didn’t delete the older version, though I don’t think that this matters). The need for the update was related to Kotlin.
At some point I started working with AndroidStudio every now and then. One time, when I opened my IntelliJ project I got that “Kotlin not configured” issue. I restarted IntelliJ, restarted my computer, and basically tried out various things to get it to run again. Don’t remember how exactly I managed to do so, but it eventually worked.
Now the exact same thing happened again. Last couple of days I was working with AS, and today after opening my IntelliJ project that “Kotlin not configured” message popped up.
It doesn’t always happen (i.e., after using AS), but I’m fairly certain it is related. My AS uses Gradle v5.1.1, so my assumption is that somehow some (Gradle) settings were changed which affected my IntelliJ project. No idea how much truth there is to this, though.
Anyway, I ran my project from the console (gradlew -run) and got the following output