android.support.v4.app.Fragment:未定义的方法getChildFragmentManager() [英] android.support.v4.app.Fragment: undefined method getChildFragmentManager()

查看:304
本文介绍了android.support.v4.app.Fragment:未定义的方法getChildFragmentManager()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用 ActionBarSherlock ViewPageIndicator ,我试图实现嵌套的片段,但该方法 getChildFragmentManager()未定义在我的 android.support.v4.app.Fragments

I'm using ActionBarSherlock and ViewPageIndicator and I tried to implement nested fragments, but the method getChildFragmentManager() is undefined in myandroid.support.v4.app.Fragments.

有预期无其他错误,ABS和VPI工作。

There are no other errors and ABS and VPI work as expected.

我不使用的支持库V13,我在最新的版本,我已经清理我的项目。一个正常的 android.app.Fragment 不抱怨 getChildFragmentManager()

I'm not using the Support Library v13, I'm on the latest versions and I've cleaned my projects. A normal android.app.Fragment does not complain about getChildFragmentManager().

我也试过重新安排支持库的依赖关系(Android的支持,v4.jar在ABS,VPI和主体工程引用它,或者Android系统的支持,v4.jar作为外部JAR),但 getChildFragmentManager()仍然是不确定的。

I also tried rearranging the support library dependencies (android-support-v4.jar in ABS, VPI and main project referencing it, or android-support-v4.jar in as external jar), but getChildFragmentManager() remains undefined.

如果我删除了VPI不过, getChildFragmentManager()的作品,当然,VPI停止工作。因此,必须有一些错误的依赖关系,但我运行的想法去尝试。

If I remove the VPI though, getChildFragmentManager() works, but of course VPI stops working. So, there must be something wrong with the dependencies, but I'm running out of ideas to try.

任何帮助将是非常美联社preciated!

Any help would be much appreciated!

推荐答案

我有,因为不同势版本ABS和在我的项目的支持库的一些类似的问题(但不使用VPI)

i had some similar issues with the support library because of diffrent versions in ABS and in my project (but not using VPI)

尝试从&LT下载最新的Andr​​oid支持,v4.jar了Android SDK管理器,然后复制罐子; sdkdir> /演员/安卓/支持/ V4 / Android的支持-V4的.jar 到您的项目,并以ABS和VPI(AFAIK都有Android的支持 - v4.jar的旧副本中thier下载)

try to download the latest android-support-v4.jar with the Android SDK Manager and then copy the jar from <sdkdir>/extras/android/support/v4/android-support-v4.jar to your project and also to ABS and VPI (afaik both have a older copy of android-support-v4.jar in thier download)

这篇关于android.support.v4.app.Fragment:未定义的方法getChildFragmentManager()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆