The Android Notepad tutorial (exercise 1)

The next Android tutorial is the Notepad tutorial documented at http://developer.android.com/resources/tutorials/notepad/index.html

I found exercise 1 pretty straight forward. As I noted a couple of posts ago one of the most difficult aspects is getting the XML layout and resources files right. Here are a few tips that will make it easier.

1. When writing or amending your XML files, Eclipse will not validate them until you save them.

2. Errors in the XML layout files will be indicated by red circles in the left hand column of the XML source window. Hovering over the circle with the mouse will give a description of the error.

3. Right clicking in the window and selecting validate will cause the file to be saved and validated. However I found that this process reported there to be no errors or warnings even if there were errors in the XML.

4. After resolving several problems I had an error

Unparsed aapt errors – check the console for output. Android packaging problem


Cleaning the project solved this problem. Select Clean… from the projects main menu in the Eclipse Java perspective.

5. Turn off the no grammar constraints warning as described in a previous post.

Comments

Popular posts from this blog

Using Log.v, LogCat and Filters when debugging an Android Application

Examining Android database tables using an adb shell and sqlite3

Debugging Android NullPointer Exceptions