Suddenly all my XML files turn into something strange, I didn't do anything wrong. It was working 10 minutes ago. what should I do?
Asked
Active
Viewed 144 times
1
-
The second screenshot does not look like an xml file, so it won't pass that validation. – Arjan Sep 27 '19 at 14:06
-
@Arjan It was xml file, it was splash screen – Mohamed Wessam Sep 27 '19 at 14:09
-
it may have been an xml file, but it is not any more. The lines `package kotlin.contracts` and `import kotlin.internal.ContractsDsl` indicate that the file is now Kotlin code. – Arjan Sep 27 '19 at 14:28
-
1I don't know what has happened, maybe the file contents was replaced by mistake. It's also possible that your editor is confused, so it might be a good idea to close it down and restart it. – Arjan Sep 27 '19 at 14:30
-
Possible duplicate of [Android Studio shows wrong file contents](https://stackoverflow.com/questions/53249677/android-studio-shows-wrong-file-contents) – Markus Kauppinen Sep 27 '19 at 14:32
-
try to resync gradle and rebuild project. If no luck then File->Invalidate caches/Restart – GV_FiQst Sep 27 '19 at 15:28
3 Answers
1
I have faced this issue few days back. In my case,I had uninstalled and downloaded latest version of android studio. It worked for me! I suggest you reinstall android studio

sai gopal
- 66
- 1
- 9
1
I will suggest you to uninstall your Android Studio old version and install Android Studio Preview release Canary 12. That fixed this type of bugs.

Abdul Alim
- 110
- 7
0
I don't know why, but moving the project from partition C to partition D solved the problem.

Mohamed Wessam
- 167
- 2
- 12