I read that getSupportFragmentManager (and other getSupport functions) were created for the sake of Android versions under Honeycomb (3.0). Such equivalent functions for API 11+ are getFragmentManager (and other functions without getSupport).
I started a new project with minSdkVersion=”14″ and targetSdkVersion=”15″. In folder libs, I can see android-support-v4.jar which should not be there since the min SDK version is 14.
Besides, I tried to use getFragmentManager but it is not recognized at all (I can’t compile).
So, I have no choice but to use getSupportManagerFragment…
Is this normal?
As you noted, getFragmentManager() is available on API level 11+. If you don’t need classes from the support library, you can delete the support-v4.jar from your libs folder and make your activities extend Activity instead of FragmentActivity.
If you are not using the support library, your imports should not contain “support.v4.app” in them.
Thanks for a tip from @Espiandev, if you select the “Tab+swipe application” template in Eclipse, then it will automatically include the support library because this template uses the ViewPager class which only exists in the support library.