本帖最后由 jjj 于 2011-11-15 15:57 编辑
The basic sequence of build commands is as follows:
InitializeInitialize the environment with the envsetup.sh script. Note that replacing "source" with a single dot saves a few characters, and the short form is more commonly used in documentation. - $ source build/envsetup.sh
复制代码or
Choose a TargetChoose which target to build with lunch. The exact configuration can be passed as an argument, e.g. The example above refers to a complete build for the emulator, with all debugging enabled. If run with no arguments lunch will prompt you to choose a target from the menu. All build targets take the form BUILD-BUILDTYPE, where the BUILD is a codename referring to the particular feature combination: Build name | Device | Notes | full | emulator | fully configured with all languages, apps, input methods | full_maguro | maguro | full build running on Galaxy Nexus GSM/HSPA+ ("maguro") | full_panda | panda | full build running on PandaBoard ("panda") |
and the BUILDTYPE is one of the following: Buildtype | Use | user | limited access; suited for production | userdebug | like "user" but with root access and debuggability; preferred for debugging | eng | development configuration with additional debugging tools |
Build the CodeBuild everything with make. GNU make can handle parallel tasks with a -jN argument, and it's common to use a number of tasks N that's between 1 and 2 times the number of hardware threads on the computer being used for the build. E.g. on a dual-E5520 machine (2 CPUs, 4 cores per CPU, 2 threads per core), the fastest builds are made with commands between make -j16 and make -j32.
|