Chapter 2 - Installation

This document will guide you through installing everything that is needed to develop Android applications with jadex-android.

Please report any difficulties or errors in this document aswell as in the provided jadex-android libraries.

You have multiple Options:

  • If you don't use eclipse or maven, just follow step 1.
  • If you want to use eclipse, but not maven, follow step 1 and 2.
  • If you want to use eclipse and maven, follow step 1, 2 and 3.
  • To compile the example project with eclipse and maven, follow steps 1-4.
  • To compile the example project with eclipse without maven follow steps 1,2 and 5.

You can also compile the example project without using eclipse by following steps 1 and 3 and then manually starting the maven build (mvn package).

Step 1

To develop Android applications with jadex-android you need to:

Proceed to the next step if you want to use Eclipse OR start using jadex-android by adding the libraries in the extracted folder lib to your projects build path

Step 2

In order to develop Android applications using Eclipse (with or without maven), you need:

Proceed to the next step if you wish to use maven OR to step 5 if you don't.

Step 3

If you want to use Maven as Build System (required for the included example project):

NOTE: Currently (2011-10-31), the M2E-Android Plugin doesn't work together with ADT / Android SDK R13 or newer. A fix is beeing
worked on. Use R12 for now if you need Maven/Eclipse support. Update: this is fixed with jadex-android 0.0.4.

Because jadex-android artifacts are not available through a maven repository yet, you need to install those manually in your local maven repository:

  • download and install Maven (http://maven.apache.org/download.html)
  • unpack the sources.zip which is included in the jadex-android distribution.
  • open a terminal emulator (windows: cmd), change to the extracted sources directory, and run: mvn package install -P jadex-android-artifacts (maybe you need to substitute mvn with the path to the mvn executable you installed before)
  • the jadex-android artifacts are now installed in your local maven repository and can be accessed within every maven project

Step 4

To import the maven sample project in eclipse (after following steps 2 and 3)

  • extract the jadex-android-example-projects.zip, which is included in the jadex-android distribution
  • copy the jadex-android-example-project-maven directory to your workspace
  • choose File -> Import -> Maven -> Existing Maven Projects
  • select your workspace folder, select the jadex-android-example-project-maven directory and click next / finish until import is completed
  • you will be prompted to install some Eclipse Plugins (m2e android connector) and to restart eclipse
  • after restarting, the project should build without any errors
  • Starting from Version 2.1, the eclipse build will work (just click run as Android Application), if eclipse hangs see Hints on the bottom of this page
  • to build the project with maven (for jadex-android < 2.1), use the included launch config Build example project with maven 
  • to run the maven build, use the included launch config Run example project with maven, which will deploy and run the project on any android devices plugged in or emulators running. (Currently, running doesn't work, but deploying does, so launch the application manually)

Step 5

To import the non-maven sample project in eclipse (after following step 1 and 2)

  • extract the jadex-android-example-projects.zip, which is included in the jadex-android distribution
  • select File -> Import -> General -> Existing Projects into Workspace
  • locate the extracted jadex-android-example-project directory
  • optionally check copy projects to workspace
  • click Finish
  • copy the jadex-android libraries to the lib directory of the project and add them to the projects build path (you could skip jadex-android-bdi, bpmn and bdibpmn as the sample only uses a MicroAgent)
  • project should compile without errors

Hints

Tags:
Created by Alexander Pokahr on 2011/09/01 12:10
Last modified by Julian Kalinowski on 2012/04/16 19:47

Copyright (C) 2002-2012 Lars Braubach, Alexander Pokahr - University of Hamburg
XWiki Enterprise 2.1.1.25889 - Documentation