Eclipse with the Android plugin is a powerful IDE with many features, not all of which are found in the most obvious places or are well documented. At least in the Linux version under newest releases of operating systems, it also has the occasional bug that you have to work around. We collect here some tips and customizations that may be useful. The specific comments refer to the Helios edition of the Linux version of Eclipse, but other versions should have the same or similar features.
Some general features and tips are collected here, in no particular order.
Error generating final archive: Debug certificate expired on 1/18/11 2:32 PM!and none of your projects will build. The problem may be even less obvious than this, since you may just get a red x on a project when you try to execute it (even though it compiles with no errors), with an error message "Your project contains errors ..." and no further information in the main display. This is typical of errors that occur in things like the build path, rather than in individual files of the project. In that case, you can get further information by opening the Problems window using Window > Show View > Problems and expanding any error messages in that window. The overall solution to the problem is to close Eclipse, remove the debug.keystore file, and then restart Eclipse, which will force it to generate a new and now valid debug certificate.
|The location of debug.keystore is installation-dependent. It can be found from Eclipse by selecting Window > Preferences > Android > Build, which should give a window with a field displaying the path to debug.keystore. On my Linux system, it is at /home/guidry/.android/debug.keystore.|
-XX:MaxPermSize=1024m -Xms512m -Xmx1024m(the numbers represent MB of allocated memory). Save the file and restart Eclipse.
Eclipse has a number of editors, and the configuration for them can be rather obscure.
If you use version control software like SVN (and you should use version control if you do anything extensive), there may be some special issues associated with the internal file management of Eclipse in its build cycle.
If you use SVN for version control it can be a little tricky. To get SVN to work correctly you should implement the following steps in the order given. Note: There are plugins to handle SVN version control in Eclipse that may simpler to use than the procedure described here. I have always used SVN from the command line so I will describe a procedure that works for that. Although the procedure is simple, the steps must be followed exactly to prevent the version control system from becoming confused.
|The contents of the bin and gen directories are generated entirely by Eclipse and it will create these directories if they are missing. You may get an error message that the (machine-generated) R. files are missing from the gen directory in the first build after deleting bin and gen, but it should go away if you build the project again (Project > Clean). In rare instances you may have to build the project twice to get the errors associated with missing machine-generated R. files to go away.|
svn propedit svn:ignore .to permanently remove the bin and gen directories from version control and commit this change to the repository. DO NOT UNDER ANY CIRCUMSTANCE COMMIT THE bin DIRECTORY TO THE REPOSITORY.
Use of the Subclipse plugin has also been recommended to manage these issues, but I have not tried it.
I have not tried CVS with Eclipse but there is a CVS plugin for Eclipse.
Last modified: April 3, 2014