【问题标题】:SectionsPagerAdapter mSectionsPagerAdapter; says mSectionsPagerAdapter cannot be resolved to a variable [closed]SectionsPagerAdapter mSectionsPagerAdapter;说 mSectionsPagerAdapter 无法解析为变量[关闭]
【发布时间】:2013-08-04 17:29:44
【问题描述】:

SectionsPagerAdapter mSectionsPagerAdapter;说 mSectionsPagerAdapter 无法解析为变量。

它没有给我任何输入建议。

【问题讨论】:

  • 重建。检查进口。
  • 不,还有其他建议吗? SectionsPagerAdapter 是应该出现的导入吗?

标签: java android xml eclipse


【解决方案1】:

它是内部类SectionsPagerAdapter的引用变量,它扩展了FragmentPAgerAdapter类,主要处理视图分页器上的滑动或单击功能(仅对Tabs或在片段上滑动)。

可能的错误可能是 -

  1. 内部类未定义。
  2. 内部类命名错误 可变数据类型。

【讨论】:

  • 我已经尝试了很多东西,但 Eclipse 仍然不喜欢我的 mSectionPagerAdapter,这是一个屏幕截图,有什么想法吗? i.imgur.com/8WLjJA3.png
  • 查看内部类的名称是 SectionPagerAdapter,而对于可变数据类型,您使用的是 SectionsPagerAdapter。缺少的“s”。
猜你喜欢
  • 2021-11-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-04-14
  • 2021-12-21
  • 2012-02-29
  • 2020-12-07
相关资源
最近更新 更多