Android编译异常,Android 编译单独模块时的异常提示

今天在编译Android 单独系统模块时,出现了异常,提示信息如下:

make:进入目录'/android/android-source-release'

build/core/base_rules.mk:74: *** Module name: libjni_dbus

build/core/base_rules.mk:75: *** Makefile location: frameworks/base/xxxx/jni/.

build/core/base_rules.mk:76: *

build/core/base_rules.mk:77: * Each module must use a LOCAL_MODULE_TAGS in its

build/core/base_rules.mk:78: * Android.mk. Possible tags declared by a module:

build/core/base_rules.mk:79: *

build/core/base_rules.mk:80: *     optional, debug, eng, tests, samples

build/core/base_rules.mk:81: *

build/core/base_rules.mk:82: * If the module is expected to be in all builds

build/core/base_rules.mk:83: * of a product, then it should use the

build/core/base_rules.mk:84: * "optional" tag:

build/core/base_rules.mk:85: *

build/core/base_rules.mk:86: *    Add "LOCAL_MODULE_TAGS := optional" in the

build/core/base_rules.mk:87: *    Android.mk for the affected module, and add

build/core/base_rules.mk:88: *    the LOCAL_MODULE value for that component

build/core/base_rules.mk:89: *    into the PRODUCT_PACKAGES section of product

build/core/base_rules.mk:90: *    makefile(s) where it's necessary, if

build/core/base_rules.mk:91: *    appropriate.

build/core/base_rules.mk:92: *

build/core/base_rules.mk:93: * If the component should be in EVERY build of ALL

build/core/base_rules.mk:94: * products, then add its LOCAL_MODULE value to the

build/core/base_rules.mk:95: * PRODUCT_PACKAGES section of

build/core/base_rules.mk:96: * build/target/product/core.mk

build/core/base_rules.mk:97: *

build/core/base_rules.mk:98: *** user tag detected on new module - user tags are only supported on legacy modules。 停止。

先是纳闷了以下,我晕,该不是Android.mk写的有问题吧!

查询了下官方文档才发现如下信息:

user: 指该模块只在user版本下才编译

eng: 指该模块只在eng版本下才编译

tests: 指该模块只在tests版本下才编译

optional:指该模块在所有版本下都编译

原来是我这个系统模块放在了framework下,需要制定在那种情况下才编译,由于未指定LOCAL_MODULE_TAGS ,因而在用mmm 制定去make 时会报错。

解决方法: 在Android.mk 下添加下面代码即可解决。

LOCAL_MODULE_TAGS := optional

本文来源于Venus , 原文地址: http://newfaction.net/2011/03/23/android-compile-the-exception-in-a-separate-module.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值