I went through it too, quite recently.
Every time I dragged a new component to the activity
the android studio
I realized that this was happening because that element was not "offline" and the android studio
started immediately to search dependencies and add in the project, but caught by lack of memory, processing or faith.
To solve this, I:
- I closed everything that was open, I left only android studio.
- I closed my project and opened a new blank, with only one
empty
activity
.
- I started dragging all the components into this
empty activity
, one
a, and every time I dragged I waited for the IDE to finish
process and download what needed from the internet, even if it took
a few minutes.
After doing this with all the elements, and making them all available offline, I deleted this test project and went back to mine, the problem stopped happening.
Footnote: You probably have an option to download all dependencies in some menu or option from gradle
, but it must be very well hidden because I did not find in my IDE, so I did this gambiarra manually.