One fine day I open the project in Android Studio 3.4 , and there the R class was not generated. Well, I think it happens. I try Clean Project, Rebuild Project, Sync Project with Gradle Files, Sync with File System, Invalidate Caches and Restart, but they do not help. Like manual removal of the .idea and build folders.
Then I got into AndroidManifest.xml , and there was some kind of porridge - instead of a manifest, pieces from gradle.build , and in gradle.build pieces of code from autogeneration files ... To my dismay, I discovered that source codes in the middle of the code also contain pieces of code from other gradle files.
The horror was gone when I looked through the sources through a notebook - everything is clean and in place.
Reinstalling Studio does not help, as well as disabling all sorts of plug-ins. In IntelliJ IDEA, the flight is normal.
It became very interesting, what happened to the Studio, and how to fix it?