Your activity doesn’t extend FragmentActivity from the support library, therefore the method is not present in the superclass
If you are targeting api 11 or above, you could use Activity.getFragmentManager instead.
More Related Contents:
- set onclick listener not working in android for moving from one fragment to another activity [duplicate]
- Communicating between a fragment and an activity – best practices
- OnActivityResult method is deprecated, what is the alternative?
- getActivity() returns null in Fragment function
- Dilemma: when to use Fragments vs Activities:
- Why fragments, and when to use fragments instead of activities?
- How to pass a variable from Activity to Fragment, and pass it back?
- Activity, AppCompatActivity, FragmentActivity, and ActionBarActivity: When to Use Which?
- Error while Running Android Application – Could not initialize OpenglES emulation, use ‘-gpu off’ to disable it
- Sharing data between fragments using new architecture component ViewModel
- Android Fragment lifecycle over orientation changes
- Android. Fragment getActivity() sometimes returns null
- Start an activity from a fragment
- Further understanding setRetainInstance(true)
- How to wrap the height of a ViewPager to the height of its current Fragment?
- One Activity and all other Fragments [closed]
- What are the differences between activity and fragment?
- converting activity into fragment
- Starting Activity from Fragment causes NullPointerException
- Where/How to getIntent().getExtras() in an Android Fragment? [duplicate]
- When a Fragment is replaced and put in the back stack (or removed) does it stay in memory?
- How to listen for preference changes within a PreferenceFragment?
- Difference between extending LifecycleActivity,Activity,ActionbarActivity & AppCompactActivity?
- Calling startIntentSenderForResult from Fragment (Android Billing v3)
- How to replace a Fragment on button click of that fragment?
- How do you create Preference Activity and Preference Fragment on Android?
- Coordinator Layout with Toolbar in Fragments or Activity
- OnCreateView called multiple times / Working with ActionBar and Fragments
- onActivityResult not call in the Fragment
- Android Fragment onCreateView vs. onActivityCreated