TextView setText有2个方法:
final void	 setText(int resid)
final void	 setText(CharSequence text)

接受int型的参数时,调用的是第一个方法,系统会去R文件里面找int值匹配的String值,在你的R文件里面没有招到这个匹配的值,会报错。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-27
  • 2022-12-23
  • 2021-07-12
  • 2022-01-30
  • 2021-12-06
猜你喜欢
  • 2021-07-16
  • 2022-01-06
  • 2022-12-23
  • 2022-12-23
  • 2022-01-24
  • 2021-11-30
  • 2021-08-28
相关资源
相似解决方案