Annie
Annie

Reputation: 160

org.jetbrains.kotlin.util.KotlinFrontEndException: Exception while analyzing expression

I run a kotlin project successfully on my desktop, but when I import the same project on my laptop and when I rebuild the project, it's throwing "org.jetbrains.kotlin.util.KotlinFrontEndException: Exception while analyzing expression".

As suggested in net, I tried with clean build, invalidate cache and restart. I deleted the cache folders and logs but no results. I have tried Googling, but found no answer for this particular problem.

Details: Current kotlin plugin version: 1.3.61-release-Studio3.5-1, latest version of plugin is installed, using Android Studio 3.5.2

Any help is apreciated!

Upvotes: 8

Views: 7210

Answers (4)

Derek K
Derek K

Reputation: 3157

In my case it was broken xml layout file (the expection message did not indicate the file).

Upvotes: 0

Taslim Oseni
Taslim Oseni

Reputation: 6263

This seems to be a sync issue. To solve this, I performed these two steps in succession and then re-ran the project:

  • Deleted the entire build folder
  • Build > Clean-Project

Upvotes: 3

Tash Pemhiwa
Tash Pemhiwa

Reputation: 7685

In my case I was missing some jar files that were required for the app to build. So if you encounter this, check if you have all required dependencies on your classpath.

Upvotes: 1

Arun Yogeshwaran
Arun Yogeshwaran

Reputation: 451

Update Kotlin Plugin for Android Studio

I was facing a similar error, updating Kotlin Plugin and restarting Android Studio fixed the issue for me

Upvotes: 6

Related Questions