现在的位置: 首页 > 移动开发 > 正文

Android编译中错误提示FAQ (不定期更新)

2019年05月28日 移动开发 ⁄ 共 2796字 ⁄ 字号 评论关闭

Q1.     user tag detected on new module - user tags are only supported on legacy modules.  Stop.

错误提示:

。。。。
build/core/base_rules.mk:97: * If the component should be in EVERY build of ALL
build/core/base_rules.mk:98: * products, then add its LOCAL_MODULE value to the
build/core/base_rules.mk:99: * PRODUCT_PACKAGES section of
build/core/base_rules.mk:100: * build/target/product/core.mk
build/core/base_rules.mk:101: * 
build/core/base_rules.mk:102: *** user tag detected on new module - user tags are only supported on legacy modules.  Stop.


分析:问题原因:连着两日的dailybuild都不能正常编译看来一下提交记录一个同事在测试某个模组时将两个 Android.mk 文件中的编译标签修改了LOCAL_MODULE_TAGS := optional eng------->LOCAL_MODULE_TAGS := eng user
对于编译标签几个版本开关意义如下:
user: 指该模块只在user版本下才编译
eng: 指该模块只在eng版本下才编译
tests: 指该模块只在tests版本下才编译

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


NOTE:

如果需要改的地方比较多,可以用用这个命令行将所有user改成optional即可:

find ./ -exec grep -l "LOCAL_MODULE_TAGS := user" {} \; -exec sed -i.bak s/"LOCAL_MODULE_TAGS := user"/"LOCAL_MODULE_TAGS := optional"/g {} \;

Q2: [out/host/common/obj/JAVA_LIBRARIES/core-tests-hostdex_intermediates/classes.dex] Killed

错误提示:七夕一大早就发现如此错误,实在晦气,

make: *** [out/host/common/obj/JAVA_LIBRARIES/core-tests-hostdex_intermediates/classes.dex] Killed
make: *** Waiting for unfinished jobs....

分析:AMSS都编完了,dex文件(对于Android DEX文件详细说明,已经在打包的过程了,出错说明椒缺少必要的文件或者就是环境出错了。通过对log文件的查看没有提示文件的缺少,应该是环境问题。网上亦一种说法说是原因:虚拟机内存不够,增大内存试试。但是我觉得之前编译都正常,不可能到这时候来说内存不足,有的时候后确实是环境处问题,重启或者clear
或者 删掉out重新编译,我现重新编译再说 。

结果:

   重新编译后正常了。

Q3:*** user tag detected on new module - user tags are only supported on legacy modules.  Stop.

错误提示:为了给客户提供开发环境,编译make sdk,就报这个错了

*** user tag detected on new module - user tags are only supported on legacy modules.  Stop.

A3:

Q4: internal compiler error: Segmentation fault

错误提示:

前提,这个buildserver_09服务器和其他服务器一样是克隆过来的系统,之前在其他服务器也编译国报一样的错,但是这条代码分分支上也编译其他项目,都是正常的

In file included from external/webkit/Source/JavaScriptCore/wtf/HashSet.h:25:0,
                 from external/webkit/Source/WebCore/rendering/svg/SVGResourcesCycleSolver.h:24,
                 from external/webkit/Source/WebCore/rendering/svg/SVGResourcesCycleSolver.cpp:21:
external/webkit/Source/JavaScriptCore/wtf/HashTable.h: In static member function 'static unsigned int WTF::IdentityHashTranslator<Key, Value, HashFunctions>::hash(const Key&) [with Key = WebCore::SVGAnimatedPropertyDescription, Value = std::pair<WebCore::SVGAnimatedPropertyDescription, WTF::RefPtr<WebCore::SVGAnimatedProperty> >, HashFunctions = WebCore::SVGAnimatedPropertyDescriptionHash]':
external/webkit/Source/JavaScriptCore/wtf/HashTable.h:281:78: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [out/target/product/project/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/rendering/svg/SVGResourcesCycleSolver.o] Error 1
make: *** Waiting for unfinished jobs....

A4:通过近一周的排查,通过重新的搭建编译环境问题仍然存在,重新安装系统搭建环境失败,才 把问题关注到“Segmentation fault”(关于Segmentation fault的问题整理了一篇博文--) 考虑到是内存的问题,但是这又不像是代码导致的内存问题。于是怀疑到服务器配置的内存不够。

抱歉!评论已关闭.