26.1 / 26.2


#1

Not sure whether it is a errata or something but I have noticed that you get compile error in fragment instantiation method in PhotoGalleryActivity.java error even after creating PhotoGalleryFragment.java.

@Override
public Fragment createFragment()
{
return new PhotoGalleryFragment();
}

This gives a compile error saying “Fragment cannot be resolved to a type” but this goes away if I do as below

@Override
public PhotoGalleryFragment createFragment()
{
return new PhotoGalleryFragment();
}


#2

Did you try using Cmd-Shift-O to import the android.support.v4.app.Fragment class?

If you were working off of the solutions, you may also have run into issues with the old solutions. Try downloading the new ones if you still have issues.