Wrox Programmer Forums
|
BOOK: Beginning Android Application Development
This is the forum to discuss the Wrox book Beginning Android Application Development by Wei-Meng Lee; ISBN: 978-1-1180-1711-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Android Application Development section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 26th, 2012, 08:57 PM
Authorized User
 
Join Date: May 2005
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default Downloads - every line of .java has error

When I import and open the downloads I get a .java file with every line flagged with error. This has happened with several projects from the download.

Here is what I have done:
Eclipse works fine with project made from scratch and they are sitting in the workspace seen in the project explorer
I downloaded the files
In the workspace I: Eclipse Menu / File / Import
I point to the project in the download
It imports - no errors
The .java file has every line flagged with error
 
Old March 12th, 2012, 04:55 PM
Registered User
 
Join Date: Feb 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, this is common.
In Eclipse, choose Window - Preferences - Java - Compiler.
You need to change JDK Compliance level. Try 1.5. You must do this BEFORE you attempt to import any code.

I've had problems recovering after having tried with the "wrong" compliance level. If it happens to you, try deleting the project by right clicking on it and check the box in the dialog (Delete project contents on disk (cannot be undone). Otherwise you risk getting a ghost project which cannot be deleted nor re-imported. In worst case, try importing (with another JDK dompliance level) to another workspace. You can create new under File - Switch workspace. Eclipse restarts itself when switching.

Oh yes, and with the correct JDK compliance, then you can right click on the project in the project explorer and choose Properties - Android. Then you can check the "Project Build Target", for example "Android 2.2". (It is impossible to make any choices there when the JDK compliance level is wrong). You can manage which project build targets are available with the Android SDK Manager, and I think that part is well documented.

Last edited by Typo; March 12th, 2012 at 05:02 PM..





Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Reporting With Line Numbers ef1196 Pro Visual Basic 2005 10 December 12th, 2006 03:28 PM
Error: Line 8: Incorrect syntax near '.' ; Help! Fly4High SQL Server 2000 2 August 15th, 2006 03:02 AM
returning error line robertdavies Classic ASP Professional 2 September 30th, 2004 09:06 AM
Parse error on line that does not exist shabboleth Beginning PHP 1 December 19th, 2003 01:41 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.