Classy Data

Getting Started with Eclipse for Android Developers

Installation

Eclipse now provides an installer. Select the installer for the target platform then download and run. The installer provides a choice of IDEs, but the one discussed here is Eclipse IDE for Android Developers. This IDE must be linked to an Android SDK installation - see Set Up Android SDK Note that Eclipse will try to resolve Classy Data dependency on SDK versions Android 6.0 (API23) and Android 7.0 (API24).

Note that the Eclipse installation is designed for personal deployment and will place content in the user's home directory. Do not install as super user on Linux.

Set Up Workspace

On launching Eclipse, you are presented a dialog to choose a workspace location. Because Android application development entails working with a large number of individual projects, it is recommended to devote a workspace to each application. The first order of business with a new workspace is to adjust Preferences where defaults do not suit. Then follow instructions to set up Android Support Library Projects as Eclipse is currently not equipped to directly import Android's AAR archives. You will now be ready to import the desired application projects as described in the following section. Note that if setting up Classy Apps, then set up Classy Data first.

Importing Maven projects into Eclipse

Projects are organized as a parent POM and one or more nested modules. When the parent POM is selected to be imported into your workspace, the projects of the nested modules are automatically selected:

  • From the top menu bar go File, Import... and the Import dialog pops up.
  • Expand "Maven" and select "Existing Maven projects". Click Next. The Import Maven Projects dialog pops up.
  • Set "Directory root" to the project home directory, and the parent POM and it's nested modules are automatically selected as projects.
  • (Classy Data only) Deselect the aar projects - classy_data_lib, support_v4
  • Click finish.
When launching RobolectricTestRunner JUnit tests in Eclipse, be sure to select the JUnit Test Launcher and not the "Android JUnit Test Launcher".