Address: http://blog.sina.com.cn/s/blog_4b650d650100nstz.html
The android source code package contains about 3 GB of compressed files. It requires a lot of skills to use some of the built-in source code. Otherwise, some libraries cannot be found, and a large number of errors may be confusing, slave slave.
Let me take the desktop code as an example.
The desktop code is in the packages \ apps \ launcher2 directory of the source package. if you want to use it in eclipse, copy launcher2 to the eclipse working directory. however, generally, the android sample and its source code project require some skills to open. You can search for it online. I can't remember whether it was mentioned before.
1. Copy laucher2 to the eclipse working directory.
2. Compile the VM in android_froyo/out/target/common/obj/java_libraries/framework_in
Change the name of classes. Jar compiled under termediates/to classes-framework and copy it to the SDK/platforms/Android-8 directory.
3. Click eclipse> Project> properties to bring up the following dialog box (figure 1)
4. Click Add library..., select user library, and click Next.
5. In the pop-up dialog box "add library", click User libraries... (figure 2)
6. Select New... (figure 3)
7. Enter the framework and click OK.
8. Return to Figure 1 (figure 4)
9. Select the order and export labels, select the framework, click up, move the framework to the top, and then click OK.
10. Run the launcher2 project and there will be two errors. comment out the error lines and run them again.
11. launcher2.
12. Click the package name and press f2 to change the package name under the src directory to com. Eagle. launcher3.
13. Then, build the project... until there is no error location. Then, compress all the files and change Android. laucher2 to Eagle. launcher3.
14. next, the com. android. change the name of the launcher directory to com. eagle. launcher4, huh, please. repeat Step 13. if the com. android. launcher directory, delete it.
15. Finally, start running the project. If an error is reported, find the content that may not be replaced.
16. Finally, the program can run... haha. The figure below shows the launcher that I run in this way, but the name is different.