Set the Java Compiler Compliance Level and Show Line Numbers

Android does not fully support Java SE 7. To ensure that the book’s examples compile correctly, configure Eclipse to produce files that are compatible with Java SE 6 by performing the following steps:

1. Open Eclipse (Image or Image), which is located in the eclipse subfolder of the Android SDK/ADT bundle’s installation folder.

2. When the Workspace Launcher window appears, click OK.

3. Select Window > Preferences to display the Preferences window. On Mac OS X, select ADT > Preferences....

4. Expand ...

Get Android™ How to Program, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.