The method add(Fragment) in the type ArrayList<Fragment> is not applicable for the arguments (ImageF
来源:互联网 发布:洛天依黑暗五部曲 知乎 编辑:程序博客网 时间:2024/05/22 15:13
Fragment调用add方法的时候一直报错的原因:
- add(Fragment)方法中的参数类型和List 中的参数类型不匹配
- 换句话说如下图所示的 List中的参数也就是Fragment是android.app.Fragment类型,但是NewsFragment StoryFragment 都是extends android.support.v4包下的Fragment
- 也就是参数类型不匹配,需要将参数类型改成一样的即可,我这里将List 中的Fragment 改成android.support.v4包下的Fragment
0 0
- The method add(Fragment) in the type ArrayList<Fragment> is not applicable for the arguments (ImageF
- The method add(int, Fragment) in the type FragmentTransaction is not applicable for the arguments (i
- The method replace(int, Fragment, String) in the type FragmentTransaction is not applicable for the
- The method replace(int, Fragment, String) in the type FragmentTransaction is not applicable for the,
- 错误:The method replace(int, Fragment) in the type FragmentTransaction is not applicable for the argum
- The method replace(int, Fragment) in the type FragmentTransaction is not applicable for the argument
- The method replace(int, Fragment) in the type FragmentTransaction is not applicable for the argument
- 错误:The method replace(int, Fragment) in the type FragmentTransaction is not applicable for the argum
- The method setStatus(int) in the type Goods is not applicable for the arguments (Integer)
- The method setClass(Context, Class<?>) in the type Intent is not applicable for the arguments (GameV
- The method load(Class, Serializable) in the type Session is not applicable for the arguments (Class<
- The method setBackground(Drawable) in the type View is not applicable for the arguments (int)
- The method setValue(String) in the type ParamTag is not applicable for the arguments (long)
- [真理永垂不朽]The method XXX in the type FragmentTransaction is not applicable for the arguments XXX
- he method get(Class, Serializable) in the type HibernateTemplate is not applicable for the arguments
- android学习——The method replace(int, Fragment) in the type FragmentTransaction is not applicable for t
- Android Error - The method replace(int, Fragment) in the type FragmentTransaction is not applicable
- The method replace(int, Fragment, String) in the type FragmentTransaction is not applicable...
- [BZOJ 1592] [Usaco2008 Feb] 路面修整
- HDU 5616 Jam's balance
- Pollard's Rho Algorithm——求正整数的质因数
- 【plan】:近几月工作计划
- CentOS install Python2.7
- The method add(Fragment) in the type ArrayList<Fragment> is not applicable for the arguments (ImageF
- 最近最久未使用(LRU)页面置换算法原理及模拟实现
- RecyclerView焦点跳转BUG优化
- hdoj 1874 畅通工程 vector邻接表测试
- 比赛记
- StarUML 建模MD版
- 贪心1002
- Cassandra 2.2.5 install
- C语言常见文件操作