运行项目时,我在android studio中收到ClassCastException。谁能告诉我是什么导致了此错误。
ClassCastException:com.intellij.psi.impl.source.PsiPlainTextFileImpl无法转换为com.intellij.psi.xml.XmlFile
谢谢。
终于解决了这个问题。这个问题帮助了我。尝试打开布局XML文件时,Android Studio ClassCastException。我在值中有一个11MB的xml文件。那就是问题所在。删除后,问题得以解决。
并且,如果要使用较大的XML文件,请在Android Studio的bin文件夹中的idea.properties和vmoptions中添加以下代码。
**Add in idea.properties**
#------------------------------------------------------------- --------
# Maximum file size (kilobytes) IDE should provide code assistance for.
# The larger file is the slower its. editor works and higher overall system memory requirements are
# if code assistance is enabled. Remove this property or set to very. large number if you need
# code assistance for any files available regardless their size.
#---------------------------------------------------------------------
idea.max.intellisense.filesize=999999
**Add in vmoptions**
-Didea.max.intellisense.filesize=999999 # <--- new line
Reference: https://stackoverflow.com/questions/23057988/file-size-exceeds-configured-limit-2560000-code-insightfeatures-not-availabl
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句