Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Updated to Android Studio 3.0. Getting a "Kotlin not configured" error

I just updated to Android Studio 3.0 and I'm getting this error with an existing project:

Kotlin not configured

When I go to Tools>Kotlin>Configure Kotlin in Project, I get an error saying "no configurators available". Also get the error below with the red java:

enter image description here

I've also tried:

  • Restarting
  • Clean and Rebuild
  • Invalidate caches/restart.
like image 409
Ryan Lertola Avatar asked Nov 08 '17 01:11

Ryan Lertola


People also ask

Is Kotlin installed with Android Studio?

Android Studio provides full support for Kotlin, enabling you to add Kotlin files to your existing project and convert Java language code to Kotlin. You can then use all of Android Studio's existing tools with your Kotlin code, including autocomplete, lint checking, refactoring, debugging, and more.


2 Answers

I first tried with invalidate cache/ restart option but it doesn't help me.

When I updated Kotlin to 1.1.60 in project's gradle file, problem is solved.

Also, use this in app's gradle for stdlib

implementation "org.jetbrains.kotlin:kotlin-stdlib:1.1.60"  

instead of

implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.60" 
like image 91
Mladen Rakonjac Avatar answered Oct 16 '22 11:10

Mladen Rakonjac


In Android Studio, click on File -> Invalidate Caches / Restart... , then select "Invalidated and Restart". This solved my problem.

like image 22
Colibri Avatar answered Oct 16 '22 12:10

Colibri