简体   繁体   中英

Android Studio stuck at "Analyzing..." but only when opening Java files

When I've updated Android Studio version to 2020.3.1 on Windows 10, my android studio stopped recognizing code of Java files, it just stucks at analyzing mode and displays plain code and does not show any errors or it takes forever to show it.

I looked at all other problems on Stackoverflow similair to this, but nothing I tried seems to help.

For example here: Android Studio stuck at "Analyzing..." They focus on Kotlin, but not Java and for me Kotlin works well, it just stucks at "Analyzing..." when opening Java files.

I tried opening other projects with my Android Studio and this problem does not disappear. I also tried reinstalling Android Studio, updating all libraries, Invalidate caches / restart - didn't help.

Does anyone know what's wrong could be with Android Studio?

尝试从 AppData 中删除 .gradle .android 文件夹

After spending all day, I finally solved this issue. Here is what I did on Windows 10:

  1. Go to Users/YourName
  2. Type %AppData% in location bar on top
  3. AppData > Roaming location should appear now, open Google folder and delete all Android Studio folders
  4. Then go back to AppData Folder, open Local folder, then Google folder and delete all android Studio folders here too.
  5. Restart Android Studio.

转到此处 C:\\Users\\user\\AppData\\Local\\Google\\AndroidStudio2020.3 并删除缓存文件夹(100%工作)跟随..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM