Android source code compilation considerations
From the official documents and practices, we can summarize the following points: 1. You can use eclipse to edit JAVA programs and check errors (mainly for class library inclusion and syntax ), however, you cannot compile and run the android source code on eclipse. You must make (or mm or mmm) in shell. 2. The android source code folder contains some eclipse configuration files ,. claapath: eclipse project configuration file, so that we directly put the android source code file and JAVA package into the project android-formatting.xml and android. importorder: This is very important. It is mainly used to standardize our encoding style and make it easier to make our code style consistent. 3. When importing android source code as a project into eclipse, pay attention to two points. 1) the new project must be a java project, not an android project. Otherwise, the android source code will be damaged (generally multiple files/folders are added). 2) check before importing. in classpath Whether the file contains a corresponding file (folder) in the android source code. Otherwise, the android source code will be damaged (generally multiple files/folders are added). In general: 1. Use eclipse to edit code and check for errors. 2. do not compile or run the android source code program on eclipse. You can only use make (or mm or mmm) on the command line) compile the android source code 3. debug the android source code program on eclipse (Principle: eclipse uses the ddms server to debug the emulator), and can perform single-step debugging and breakpoint debugging. 4. The program to be debugged removes it from/system/app/and installs it under data/app, this is more convenient 5. It is more convenient to install and uninstall a program through adb push and adb shell rm