aboutsummaryrefslogtreecommitdiffstats
path: root/ddms/app/README
blob: 0d9bbc4dfcff57e2b96c7324f64d5cd47f3b0b28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Using the Eclipse project DDMS
------------------------------

DDMS requires some external libraries to compile.
If you build DDMS using the makefile, you have nothing to configure.
However if you want to develop on DDMS using Eclipse, you need to
perform the following configuration.


-------
1- Projects required in Eclipse
-------

To run DDMS from Eclipse, you need to import the following 5 projects:

  - sdk/androidpprefs:      project AndroidPrefs
  - sdk/sdkstats:           project SdkStatsService
  - sdk/ddms/app:           project Ddms
  - sdk/ddms/libs/ddmlib:   project Ddmlib
  - sdk/ddms/libs/ddmuilib: project Ddmuilib


-------
2- DDMS requires some SWT and OSGI JARs to compile.
-------

SWT is available in the tree under prebuild/<platform>/swt

Because the build path cannot contain relative path that are not inside
the project directory, the .classpath file references a user library
called ANDROID_SWT.
SWT depends on OSGI, so we'll also create an ANDROID_OSGI library for that.

In order to compile the project:
- Open Preferences > Java > Build Path > User Libraries

- Create a new user library named ANDROID_SWT
- Add the following 4 JAR files:

  - prebuilt/<platform>/swt/swt.jar
  - prebuilt/common/eclipse/org.eclipse.core.commands_3.*.jar
  - prebuilt/common/eclipse/org.eclipse.equinox.common_3.*.jar
  - prebuilt/common/eclipse/org.eclipse.jface_3.*.jar

- Create a new user library named ANDROID_OSGI
- Add the following JAR file:

  - prebuilt/common/eclipse/org.eclipse.osgi_3.*.jar


-------
3- DDMS also requires the compiled SwtMenuBar library.
-------

Build the swtmenubar library:
$ cd $TOP (top of Android tree)
$ . build/envsetup.sh && lunch sdk-eng
$ sdk/eclipse/scripts/create_sdkman_symlinks.sh

Define a classpath variable in Eclipse:
- Open Preferences > Java > Build Path > Classpath Variables
- Create a new classpath variable named ANDROID_OUT_FRAMEWORK
- Set its folder value to <Android tree>/out/host/<platform>/framework
- Create a new classpath variable named ANDROID_SRC
- Set its folder value to <Android tree>

You might need to clean the ddms project (Project > Clean...) after
you add the new classpath variable, otherwise previous errors might not
go away automatically.

The ANDROID_SRC part should be optional. It allows you to have access to
the SwtMenuBar generic parts from the Java editor.

--
EOF