Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 658
Matheo26 Avatar asked Nov 24 '20 10:11

Matheo26


Video Answer


5 Answers

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

like image 183
Ace Avatar answered Nov 06 '22 18:11

Ace


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.

like image 39
Shubham Garg Avatar answered Nov 06 '22 19:11

Shubham Garg


Android Studio -> File -> Invalidate Caches and Restart

Nothing else helped me.

like image 26
AndrewS Avatar answered Nov 06 '22 18:11

AndrewS


Try it:

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

like image 24
Mr.Coder.Z Avatar answered Nov 06 '22 17:11

Mr.Coder.Z


From my project I deleted the files

.idea/gradle.xml
.idea/workspace.xml

and it solved it for me.

Seems to be that I had previously configured the project's gradle incorrectly and even after several reinstalls I wasn't getting any luck.

like image 37
Jože Ws Avatar answered Nov 06 '22 17:11

Jože Ws