getWebView() error in tutorial #9

122 Views Asked by At

I created the AbstractContentFragment object following the instructions for tutorial #9. After copying in the code from the book I get the error "The method getWebView() is undefined for the type AbstractContentFragment"

I have checked the code - it is exactly what is in the book. I have the actionbarsherlock library included in the project - no issues with Tutorial #8. I can see the getWebview() method in the webviewfragment class.

Pointers?

1

There are 1 best solutions below

7
On

I have checked the code - it is exactly what is in the book

Pretty much, by definition, it is not.

I can see the getWebview() method in the webviewfragment class.

Presumably, your AbstractContentFragment is not extending WebViewFragment. This is covered in Step #3 of Tutorial #9 (at least in Version 4.5 of the book -- different book editions may have slightly different editions of the tutorial).