I am getting a ClassCastException in android studio while running my project. Can anyone tell me what is causing this error.

ClassCastException: com.intellij.psi.impl.source.PsiPlainTextFileImpl cannot be cast to com.intellij.psi.xml.XmlFile

Thanks.