getSupportFragmentManager cannot be resolved to type


import; import; import;

I have the above imports and still cannot get rid of the error

in my code.
Here is my implementation:


Howdy JohnWayne,

getSupportFragmentManager() is a method call, and I think the issue here is that you just need to remove the “new” keyword from the line you highlight and all will be well. Using “new” tells Java that you are trying to instantiate a new instance of a class, where in this case you’re just trying to call a method.


Thanks brian! Somewhat “new” to java programming.


I am having the same problem on my Mac. I removed the “new” but I’m still getting an error. How can I resolve the issue?


phi1594, can you post your code? Maybe the problem is on some other line.