You'll need Eclipse with the Android Development Tools plugin installed. Follow the full directions found here:http://developer.android.com/sdk/eclipse-adt.html#installing. Make sure your Android SDK and ADT plugin are both up to date.
Building K-9 can take up to 1 GB of memory. You have to allow Eclipse to use this amount of memory or you will get out-of-memory errors when the Android compilers are run. In order to do this, edit your eclipse.ini file and make sure the following arguments are present: -vmargs -Xms128m -Xmx1024m
You can also pass these parameters to Eclipse on the command line.
To set up Eclipse to build K-9 Mail we need two projects. The first one is the ActionBarSherlock project and the second one is K-9 Mail. We'll set them up in that order too:
Clean and build this library project.
Inside your PROJECTFOLDER, make sure you have a directory named 'gen'
From Eclipse, File > Import
Under General, select 'Existing Projects into Workspace' and click Next
Next to 'Select root directory', Browse to your K-9 working copy
Click Finish
In the Package Explorer, right click 'k9mail' and click 'Properties'
Select 'Android' again and then click 'Add'.
Now add the previously created library project to this project.
Select 'Java Compiler'
Check 'Enable project specific settings'
Set the 'Compiler compliance level' to 1.6
Click OK
You should now be able to build the project. If it had been built previously, make sure you clean it first. If you get errors about missing translation information for some locales, go to Project -> Properties -> Android Lint Settings and change the severity of MissingTranslations to Warning.