1. Copy the. classpath file from the/develop/IDE/Eclipse/. classpath file in the source code package to the root directory of the source code package.
cd /path/to/android/root cp development/ide/eclipse/.classpath . chmod u+w .classpath
2. Modify the eclipse configuration file and the eclipse cache size. There is an eclipse. ini file in the eclipse root directory. Modify the following three lines:
-XX:MaxPermSize=256m -Xms128m -Xmx512m
3. Start eclipse, create a Java project, and set the project path to the android source code package.
The above is the reference of Google official documentation, you can find the relevant articles in http://source.android.com here
In addition, after the source code is imported, eclipse reports three errors,
project 'ginger' is missing required library: 'out/target/common/obj/JAVA_LIBRARIES/google-common-intermediates/javalib.j a r project 'ginger' is missing required library: 'out/target/common/obj/JAVA_LIBRARIES/gsf-client-intermediates/javalib.jar The project cannot be built until build path errors are resolved.
The solution found on the internet is as follows:
In the Eclipse project bar, right-click the project name, select build path> Configure build path from the menu, and delete the project in the libraries option.
out/target/common/obj/JAVA_LIBRARIES/gsf-client-intermediates/javalib.jar
out/target/common/obj/JAVA_LIBRARIES/google-common-intermediates/javalib.jar
Add
Out/target/common/obj/java_libraries/android-common_intermediates/javalib. jar this jar package is OK
Reprinted from: http://blog.csdn.net/fox_hu27/article/details/6567910