Reference: http://source.android.com/source/using-eclipse.html
CD/path/to/Android/root
CP development/IDE/Eclipse/. classpath.
Chmod U + W. classpath # Make the copy writable
Open eclipse and importCodeStyle File android-formatting.xml
Windows-> preferences-> JAVA> code style> formatter
Then select the android process under the development/IDE/Eclipse/android-formatting.xml
Then Import development/IDE/Eclipse/Android. importorder in organize import in code style.
Create a Java project in eclipse. You can enter the project name as needed. Android is used here.
The most important step is not to use the default project path, do not select "use default location", and use the top-level directory where the android code is located.
Click Finish to view the code of the entire android project in a short time.
To view more project code, you can modify the. classpath file and add the project path to be viewed.