Android Activity Main xml stuck loading

While recently working on the new Android Studio 4.X, I can across an issue where when I clicked on the activity_main.xml resource file, it did not open instead I could see a loading icon stuck in an infinite loop. I was able to resolve it and seems below could be one of the reasons if you too are facing the same issue.

If you see the above screenshot, you could see that I have two processes running, the top process is trying to download Gradle packages and the bottom one says "indexing paused due to Import "MyApp" Gradle project". So that means the project is not indexed yet and waiting for the above process to complete.


I waited for Gradle process to complete - it took ~10 mins and I was able to open activity_main.xml again :)


  • Faced the same issue, I guess its because I did a fresh install of the IDE and the first run is slow isn't it?
    anon 19 Sept 2020 10:32:01 GMT
  • Did not work for me? What may be the other reasons for this? Can you help?
    user135 07 Aug 2020 11:23:13 GMT
  • Ah! Thank you, had the same issue.
    user2934 02 Aug 2020 16:08:21 GMT
  • Further comments disabled!
Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap