1. Copy the Eclipse Engineering configuration file to the Android source root directory
2. Create a new file in the Android source root directory. Project, content is:
<?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 system source code
The Android source code as a project to import Eclipse import before you check. classpath files in the Android source code in the corresponding files (folders), otherwise it will destroy the Android source code (usually add files/folders),. Redundant paths in the classpath can be removed
Create a new Java project (not Android project, otherwise destroy the Android source code), choose to import from the existing project, the project name is arbitrary, complete.
Example
STEP.1 Creating Java Project
STEP.2 confirm the package to import
STEP.3 Fix Dependencies (add if you can find the corresponding jar or remove the jar with the Red Fork)
4. Debug Settings:
Double-click on the Run->debug configurations->remote Java application, and then, "Host:" is set to localhost, "Port:" is set to 8700 or 8600, "Connection Type "is standard (Socket Attach)
Android system source Import to eclipse