Stuck on Your First Android Application


I’ve deleted this project and started over several times, checking very closely that I’m following your instructions as closely as possible. But there are differences from your book and I’m clearly getting off the track. Here’s what I see every time:

On blank activity panel, rather than a "navigation choice, there a menu resource name that updates to "menu_quiz

On creating project, there are no files in the package manager under “src” or “res/layout”

The editor does not open automatically to “activity_quiz.xml”.

There are several error messages in the console saying that resources named “Theme.AppCompat.Light” and “Theme.AppCompat.Light.DarkActionBar” are not found. Based on other forum entries, I’m guessing these may just be noise.

I got around the missing xml file by right clicking on “layout” in the package explorer pane, and asking to create a new android xml file. I named it activity_quiz.xml and selected a root type of LinearLayout. I typed in the statements as shown in your book.

In res/values, a strings.xml file did exist, but only contained the “app_name” string, not the menu_settings string. I added all the the strings called for in your text (including the menu_settings string). Saving strings.xml eliminates all the errors in activity_quiz.xml and the graphical view can be displayed as you show it - except that there is no GeoQuiz bar at the top - significant, I suspect.

Since there was no to work with, I tried creating it based on your book. I created a package under “src”, then created within that. I typed in the statements shown in the book but cannot get an error free listing because is undefined. And indeed, based on reading head a bit, it looks like it should have been defined in the generated file “com/bignerdranch/androis/geoquiz/”, but it is not.

At this point, I’m stuck. Apparently the eclipse android development tools/SDK have changed from the time your book was written(?). What can I do to proceed? By the way, some of the forum posting ask about contents of AndroidManifest.xml - the uses-sdk section contains:


quite literally the same problem I’m having. Any suggestions?


Any help here? Please? I decided I was going to give up on the Big Nerd Ranch Guide and try another book. However, looking through several alternatives, I found that every one of them shows the New Android Project “Blank Activity” screen with three (or more) input fields, the first three of which are labelled “Activity name”, “Layout name”, and “Navigation type”. In place of the latter navigation type field, mine has an input field labelled “Menu Resource Name” that primes with “menu_geo_quiz”. Is this a clue as to what is going on?


Perhaps you may want to try with Android Studio. This is the IDE direction they are going anyway so perhaps start now. It is working fine and has not been an issue in terms of translating the books steps to the environment.


It was already on my to-do list for today. Disappointing. I regret buying the book, hopefully it wasn’t a total waste of money.


It was already on my to-do list for today. Disappointing. I regret buying the book, hopefully it wasn’t a total waste of money.

It’s not. While it is hard to get away from the importance of the IDE the differences between Eclipse with the plug-ins and Android Studio aren’t so great that the book becomes unusable. Once into the nuts and bolts it doesn’t matter. This is still a relevant and useful book.