I have a problem. When I start a new project in Android Studio and select a navigation drawer activity it happens. I don\'t have access to my activiy_main_drawer.xml
Ah... I resolved it with the help on this page and a little bit more effort.
I installed Android Studio v.3.3.1 today on my Zenbook. I was stuck with the same error "waiting for a build to finish" and Display tab was not showing up for activity_main.xml Here is what I did to resolve this error.
Step 1. I searched for SDK tools and downloaded required SDK versions.
Step 2. downloaded Gradle 5.2.1 and extracted the files in Program Files\Android\Android Studio\gradle
Step 3. File>Settings>Build..>Gradle and choose the local distribution of Gradle 5.2.1
Step 4. Go to File>Sync Project with Gradle files and allow some time to sync...
finish() :) developing android with Kotlin
Stuck w/ the issue for a month, got it after AndroidX update. Tried to invalidate caches, manually remove them (project, grade, studio), re-install studio, re-import project - nothing helped.
This script resolved it finally (w/ -nuke option)
https://github.com/rock3r/deep-clean
My experience: I was accidentally importing "myself" into the view, creating infinite loop:
item_task.xml
<androidx.recyclerview.widget.RecyclerView
...
tools:itemCount="3"
tools:listitem="@layout/item_task" /> <---- circular dependency mistake
Setting a correct list item in the recycler view solved the issue.
I uninstalled my 3.1.2 and installed version 3.2 Canary 18 from Android Studio download archives. Everything is fine now.
We welcome all constructive edits, but please make them substantial. Avoid trivial edits unless absolutely necessary.
Syncing gradle, reopening, rebuilding, invalidating caches and restarting, trying different Android studio versions. None of these helped. When I would open XML preview I would still see that damn issue.
What helped in the end is closing Android studio, going to gradle directory:
cd ~/.gradle/
And deleting caches folder:
rm -rf caches
After that reopening Android studio will take some time as it still has some rebuilding to do, but afterwards all xml layouts were being properly rendered again.
File -> Sync project with Gradle files