gpt4 book ai didi

android - ClassCastException 安卓工作室

转载 作者:行者123 更新时间:2023-11-30 04:55:35 24 4
gpt4 key购买 nike

我在运行我的项目时在 android studio 中收到 ClassCastException。谁能告诉我是什么导致了这个错误。

ClassCastException: com.intellij.psi.impl.source.PsiPlainTextFileImpl 无法转换为 com.intellij.psi.xml.XmlFile

谢谢。

最佳答案

终于解决了这个问题。这个问题帮助了我。 Android Studio ClassCastException When Attempting to Open A Layout XML File .我有一个 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

关于android - ClassCastException 安卓工作室,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59255750/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com