From time to time my installation of Android Studio goes crazy and isn't able to load ANY files from my project directory correctly.
I don't exactly know when and under which circumstances this problem happens, but it might be ddepend on system crashes. (My Windows computer crashes 1-3 times per week due to hardware problems. I cannot blame Windows for that, because Ubuntu also crashes sometimes on my hardware.)
However, The misread files look something like that:
That's probably the content of some other file in my project directory.
Furthermore, I can rule out problems with the file/filesystem because Notepad++ as well as the Windows Editor are able to load the files correctly.
I generally use UTF-8 encoding and since I didn't change anything in the Android Studio settings it is unlikely that these problems are related to that. Git diff also shows that the files are unchanged.
I've also tried to invalidate Android Studio's cache but it doesn't help anything.
So far the only (and rather time-consuming solution) I've come to find, is to save all files with notepad++ again (overwriting the old file content).
If you're not able to help me, I will have to write a script, that overwrites every file in the project folder.
I'm looking forward to hearing your advice. NeroTyc