Reputation: 160
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
Reputation: 3157
In my case it was broken xml layout file (the expection message did not indicate the file).
Upvotes: 0
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:
Upvotes: 3
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
Reputation: 451
I was facing a similar error, updating Kotlin Plugin and restarting Android Studio fixed the issue for me
Upvotes: 6