1. Copy the Eclipse project configuration file to the root directory of the android source code.
CP development/IDE/Eclipse/. classpath ./
2. Create a file. Project in the root directory of the android source code with the following content:
XML Code
<? XML version = "1.0" encoding = "UTF-8"?>
<Projectdescription>
<Name> gingerbread </Name>
<Comment> gingerbread source </comment>
<Projects>
</Projects>
<Buildspec>
<Buildcommand>
<Name> org. Eclipse. jdt. Core. javabuilder </Name>
<Arguments>
</Arguments>
</Buildcommand>
</Buildspec>
<Natures>
<Nature> org. Eclipse. jdt. Core. javanature </nature>
</Natures>
</Projectdescription>
3. Import the android source code as a project into eclipse
Check Before importing. whether the files in classpath have corresponding files (folders) in the android source code; otherwise, the android source code will be damaged (usually multiple files/folders are added ),. the redundant paths in classpath can be deleted.
Create a Java Project (not an android project, otherwise the android source code will be damaged) and select import from an existing project. The project name is arbitrary and complete.
4. debugging settings:
Double-click Run-> debug deployments-> remote Java application, and set "Host:" to localhost, "port:" To 8700 or 8600, "connection type" is standard (socket attach)