Android Studio stuck at "Analyzing..."

In my Android project (Android 4.2 Canary 15), completion does not work anymore, and neither does syntax highlighting. This is happening in one Android project only (the others work well).

No completion, no syntax highlighting, ...

I have tried to clean, rebuild the project, create a new project and import files, but no changes... I have tried to delete .idea directory and all .iml files, but not better...

In the "File" menu, I've just tried the option "Invalidate caches / restart" and now all classes in my project are blocked at the state "Analyzing..." and completion still does not work...

Analyzing...

Build and run project work, and my application starts well on my phone, but all intellij features are inactive.


Solution 1:

It appears that the Kotlin plugin was, indeed, the culprit.

Today (24 May 2021), a new version was released 1.5.10, and as soon as I installed it, everything went back to normal.

Synopsis: After upgrading from version 1.4.32 of Kotlin plugin to 1.5.0, code inspection, completion, linking to sources, javadocs, etc. all stop working (stuck at "Analyzing..." as the images here and here show), and only return for a few seconds/minutes when sth triggers a new analysis (eg. a gradle build, commit, loading new files, etc).

History of the plugin updates for reference can be found here

Solution 2:

you can just change the Kotlin version to something else and then gradle sync again This will solve the issue

you will find it in build.gradle file(project)

    ext.kotlin_version = "1.5.10"  //I used this 

you can also roll back to your previous version. If you want this should not recreate the issue.

Solution 3:

Try it:

File --> settings --> Plugins --> Android ButterKnife Zelezny --> disenable

Solution 4:

Android Studio -> File -> Invalidate Caches and Restart

Nothing else helped me.