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.
Solution:I waited for Gradle process to complete - it took ~10 mins and I was able to open activity_main.xml again :)
Comments:
- 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!
- Locate MainActivity Java or Kotlin file in Android Studio
- groovy.lang.MissingPropertyException No such property Error
- How to fix java.net.NoRouteToHostException in Android Studio
- Your Android SDK is missing, out of date or corrupted SDK Problem
- [Android Studio] MainActivity does not exist
- [Android Studio] Could not automatically detect an ADB binary
- Android Studio: Cannot perform refactoring operation
- How to Configure Eclipse keymap in IntelliJ IDE
- Android Studio setup was canceled - How to resume
- [Android Studio] Hardcoded string Button, should use @string resource
- The selected device is incompatible : Android Studio
- Android Activity Main xml stuck loading
- Android Studio 1.3 beta now Available for Developers
- Installing Android Studio Dolphin on Mac with Apple (M1/M2) Chip
- Android Studio 4.2 Canary 1 now available
- [Android Studio] Button on click example
- Eclipse like Auto Import Shortcut in Intelij IDE Android Studio
- How to enable line numbers in IntelliJ Android Studio for all files
- Delete Android Studio Projects
- How to update Android Studio
- [Android Studio] Error: Missing system image on device
- macOS Big Sur java.lang.UnsatisfiedLinkError CoreFoundation - Android Studio
- Android [SDK Manager] The system cannot find the path specified
- Failed to install Android.apk on device 'emulator-5554': timeout
- [Solved] Error launching studio
- How to Scan iPhone for Virus? Is Antivirus it really required? - HowTos
- How to Manage Profile Picture on Microsoft Teams - Teams
- Type R is already defined error : Android Error - Android
- Programmatically Send an Email from Android App using Intent - Android
- How to clear Mac Terminal screen - MacOS
- pwd Command - Print Working Directory - Linux
- Insert an inverted exclamation mark ยก using Mac Keyboard? - MacOS
- Read file from resources folder in Java project code - Java