"Set LOCAL_MODULE_TAGS to any number of whitespace-separated tags.This variable controls what build flavors the package gets included
in. For example:    * user: include this in user/userdebug builds   
    * eng: include this in eng builds
    * tests: the target is a testing target and makes it available for
tests
    * optional: don't include this"Are these the same as "variants" and if so, which name would affect
the build and how? I've noticed that everything mentioned in a
product's makefile will always get built. But what gets in the final
system.img not always the same as what gets built. 

解决方案 »

  1.   

    就是mk的标记啊,直接给你上官方的吧http://android.git.kernel.org/?p=platform/build.git;a=blob_plain;f=core/build-system.html;h=43bae03b6b7b9cba678b86d2faf424fa565497bf;hb=HEAD
      

  2.   


       user:  
      * eng: 
      * tests: 
      * optional:
    怎么解释阿?
      

  3.   

      user:    指该模块只在user版本下才编译
      eng:     指该模块只在eng版本下才编译
      tests:   指该模块只在tests版本下才编译
      optional:指该模块在所有版本下都编译
      

  4.   

    eng     This is the default flavor. A plain "make" is the same as "make eng". droid is an alias for eng.    * Installs modules tagged with: eng, debug, user, and/or development.
        * Installs non-APK modules that have no tags specified.
        * Installs APKs according to the product definition files, in addition to tagged APKs.
        * ro.secure=0
        * ro.debuggable=1
        * ro.kernel.android.checkjni=1
        * adb is enabled by default. user  "make user"This is the flavor intended to be the final release bits.    * Installs modules tagged with user.
        * Installs non-APK modules that have no tags specified.
        * Installs APKs according to the product definition files; tags are ignored for APK modules.
        * ro.secure=1
        * ro.debuggable=0
        * adb is disabled by default. userdebug  "make userdebug"The same as user, except:    * Also installs modules tagged with debug.
        * ro.debuggable=1
        * adb is enabled by default.