IllegalStateException: <Fragment> is not currently in the FragmentManager
2015-03-26 17:48
369 查看
编辑了一次,不合格被刷新了。。。
我的思路是把初始化viewpager放在oncreat()里面,先初始化ui,再获取数据。
注:之前是先获取数据,再初始化viewpager,正常情况下不会出错。
出错的原因是:
界面A(有viewpager)--(跳到)编辑界面B--保存返回界面A,这时候推出界面A,必然发生IllegalStateException: <Fragment> is not currently in the FragmentManager。
我的思路是把初始化viewpager放在oncreat()里面,先初始化ui,再获取数据。
注:之前是先获取数据,再初始化viewpager,正常情况下不会出错。
出错的原因是:
界面A(有viewpager)--(跳到)编辑界面B--保存返回界面A,这时候推出界面A,必然发生IllegalStateException: <Fragment> is not currently in the FragmentManager。
相关文章推荐
- 解决异常:IllegalStateException: Fragment <ThisFragment> is not currently in the FragmentManager
- <转> 解决异常:IllegalStateException: Fragment <ThisFragment> is not currently in the FragmentManager
- The method add(Fragment) in the type ArrayList<Fragment> is not applicable for the arguments (ImageF
- 关于The method setMapperClass(Class<? extends Mapper>) in the type Job is not applicable for the argum
- 错误:The MagicAjax HttpModule is not included in web.config. Add [<httpModules><add name="MagicAjax" type="MagicAjax.Magic
- iOS - 报错 Warning: Attempt to present <xx: xx> on <xx: xx> whose view is not in the window hierarchy!
- The method setClass(Context, Class<?>) in the type Intent is not applicable for the arguments (GameV
- The MagicAjax HttpModule is not included in web.config. Add [<httpModules><add name="MagicAjax" type="MagicAjax.MagicAja
- The method setClass(Context, Class<?>) in the type Intent is not applicable for the arguments (GameV
- Attempt to present <TestViewController2: 0x7fd7f8d10f30> on <ViewController: 0x7fd7f8c054c0> whose view is not in the window hierarchy!
- The MagicAjax HttpModule is not included in web.config. Add [<httpModules><add name="MagicAjax" type
- The method setClass(Context, Class<?>) in the type Intent is not applicable for the问题
- The method add(int, Fragment) in the type FragmentTransaction is not applica
- 打开workspace时报错:could not launch the application because the associated workspace is currently in use
- The method replace(int, Fragment) in the type FragmentTransaction is not applicable for the argument
- The type JComboBox is not generic; it cannot be parameterized with arguments <String>错误
- 错误:The method replace(int, Fragment) in the type FragmentTransaction is not applicable for the arguments (int, MyFragment)
- The Excel Connection Manager is not supported in the 64-bit version of SSIS
- The driver is activated but not currently in use
- The entity type <type> is not part of the model for the current context