android.support.v4.app.Fragment: undefined method getChildFragmentManager()
i had some similar issues with the support library because of diffrent versions in ABS and in my project (but not using VPI)
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)
Comments
-
blub over 1 year
I'm using
ActionBarSherlock
andViewPageIndicator
and I tried to implement nested fragments, but the methodgetChildFragmentManager()
is undefined in myandroid.support.v4.app.Fragments
.There are no other errors and ABS and VPI work as expected.
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 aboutgetChildFragmentManager()
.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.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.Any help would be much appreciated!
-
etienne about 11 yearsCan you get rid of android-support-v4 everywhere, and use only v13?
-
Dodge about 11 yearstry 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) i had some similar issues with the support library because of diffrent versions in ABS and in my project (but not using VPI) -
blub about 11 years@Dodge I had downloaded the latest version for my main project (or at least I thought I had!) and was using that as external jar for ABS and VPI, but I tried downloading it again anyways and voilá, problem solved (or rather, one problem replaced with others, but progress!). If you add your solution as answer I'll accept it!
-
-
yahya about 11 yearsGetting the latest version of android-support-v4.jar worked. I just downloaded VPI source once more, and copied its support library. But i guess it was an old version. Thanks!
-
Do Re over 8 yearsWhat is ABS and VPI`?
-
Dodge over 8 yearsABS: ActionBarSherlock / VPI: ViewPageIndicator