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 the Java node and select the Compiler node. Under JDK Compliance, set the Compiler compliance level to 1.6 (to indicate that Eclipse should produce compiled code that’s compatible with Java SE 6).

5. Expand the General > Editors node and select TextEditors, then ensure that Show line numbers is selected and click OK.

6. Close Eclipse.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.186.109