-
Notifications
You must be signed in to change notification settings - Fork 0
BuildingK9
#How to build K-9 Mail
K-9 Mail targets Java 1.5 (but we're using Java 1.6 @Override annotations, so a Java 1.6 compiler is needed).
K-9 Mail runs on Android 1.5 and newer versions. Currently SDK 2.2 is needed to build the code because we dynamically load classes with API 4/5/6/7/8 code if the platform supports it.
- Create a file called 'local.properties' at the root of the source tree with the following entry sdk.dir=/path/to/android-sdk-linux
ant debug
adb install -r bin/K9-debug.apk
You'll need a few new entries in your local.properties:
gcode-user=yourname
gcode-pass=your-secret-token
You'll also need googlecode_upload.pl from http://search.cpan.org/dist/Google-Code-Upload/
- Edit AndroidManifest.xml to increment the
versionCodeandversionName ant clean release- Check in and tag your new version number
- Test on actual device hardware
- Upload to the market
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. Now...
- Inside your working copy, 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 '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.
Go to Run->Run Configurations, click Android Application then click the "new" icon (sheet with plus sign). Change the name to your liking, then click the brows button and select the K9 project. Click OK.
On subsequent runs, you can click Run->Run History and then click the name of your Run Configuration.