docs/eclipse.md
[TOC]
Instructions on using Android Studio are here.
*** note This documentation was written for Eclipse 4.5 though other versions of Eclipse should work similarly.
This section contains set up steps for the very first time you start Eclipse. You should only need to go through these once, even if you switch workspaces.
Close Eclipse
Add the following lines to ~/.eclipse/init.sh:
ECLIPSE_MEM_START=1024m
ECLIPSE_MEM_MAX=8192m
These are settings that apply to all projects in your workspace. All the settings below are inside Window > Preferences.
<project root>/tools/android/eclipse/android.importorder file._abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZRight click on the project and select Properties
Exclude Resources (OPTIONAL). This can speed Eclipse up a bit and may make the indexer happier.
C/C++ Indexer (deprecated, seems to be done by default)</span>
Java
<project root>/.classpath to
<project root>/tools/android/eclipse/.classpath:
ln -s tools/android/eclipse/.classpath .classpath
Edit <project root>/.project as follows to make your project a
Java project:
<buildSpec>:
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments></arguments>
</buildCommand>
<natures>:
<nature>org.eclipse.jdt.core.javanature</nature>
Run > Run Configurations > New launch configuration > JUnit
Using Android JUnit test launcher
Test tab:
Arguments tab:
VM arguments:
-Drobolectric.dependency.dir=out/Debug/lib.java/third_party/robolectric
Classpath tab:
third_party/robolectric/cipd/lib:
android-all-5.0.0_r2-robolectric-1.jarJRE tab: