Fragment_run.xml needs a correction


The fragment_run.xml file, downloaded from the website, is missing android:id="@+id/fragmentContainer". Without this you will receive a “fragmentContainer cannot be resolved or is not a field” error on


The code from the web site works a little differently from the code described in the book. Instead, is defined in res/values/id.xml, and then assigned dynamically inside With that defined, it is not necessary to define fragmentContainer inside fragment_run.xml.


Yes I found this one myself - could not understand why SingleFragmentActivity in your code was changed from the one we had been using in the book…


Should not it be ids.xml? I thought in an earlier chapter it was so, and Eclipse did not build until I refactored id.xml to ids.xml.