I was coding these past two weeks and it was compiling/running fine. Bear with me on the history as it might be relevant to the final issue.
One morning I start getting modules not found error and gradle warnings, out of nowhere.
I solve it then proceed to have a "Default activity not found". After I made sure I had a launcher activity in the manifest file, I figured I had a much bigger problem :
80% of my layout XML (in the /res folder) Are now containing chunks of my java code, in a completely random manner. The icing on the cake : when I rollback to previous commit, as old as 2 weeks ago (that where running 100% fine), they also have the "broken xml java layouts"
It's one of the weirdest things that happened to me for a long time, please share anything that might give a clue.