-
Notifications
You must be signed in to change notification settings - Fork 0
BuildingK9
#How to build the project
= Introduction =
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.
= Building with ant =
== To build ==
-
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
== To install on your simulator or local device ==
# adb install -r bin/K9-debug.apk
== To build and sign the project for upload to the marketplace ==
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/
= Building with Eclipse =
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...
You should now be able to build the project. If it had been built previously, make sure you clean it first.
== To install on your simulator or local device ==
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.