android The method getText() is undefined for the type R.string

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/27 01:28:15

android The method getText() is undefined for the type R.string

如果你在编译Android项目的时候发生下面错误
The method getTextContent() is undefined for the type Element, 一般原因是你选择了Android project target版本太低,getTextContent()与setTextContent()是高版本Android的提供的,修改方法一是提升Android的版本,或者你可以用getFirstChild().getNodeValue()来替换.