简体   繁体   English

在Ubuntu 14.04 LTS 64位上构建android源代码(Lollipop-> master分支)时出错

[英]Error while building android source code ( Lollipop -> master branch) on ubuntu 14.04 LTS 64-bit

I have been trying to build the android lollipop source code which I downloaded from the given URL ie WWW.source.android.com I followed all the procedures required to build the source code on my machine. 我一直在尝试构建从给定URL(即WWW.source.android.com)下载的android lollipop源代码,我遵循了在我的机器上构建源代码所需的所有过程。 Configuration of my PC : Ubuntu 14.04 LTS 64-bit, i3-core processor,PC's RAM is 4GB , 1TB HDD 我的PC的配置:Ubuntu 14.04 LTS 64位,i3核处理器,PC的RAM为4GB,1TB硬盘

But I faced with some errors on the terminal which are as follows: 但是我在终端上遇到了一些错误,如下所示:

**clang++: error: unable to execute command: Killed
clang++: error: clang front end command failed due to signal (use -v to see invocation)
clang version 3.6
Target: arm--linux-androideabi
Thread model: posix
clang++: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: /tmp/ARMDisassembler-d8183f.cpp
clang++: note: diagnostic msg: /tmp/ARMDisassembler-d8183f.sh
clang++: note: diagnostic msg:

********************

make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libLLVMARMDisassembler_intermediates/ARMDisassembler.o] Error 254
make: *** Waiting for unfinished jobs....**

help will be appreciated. 帮助将不胜感激。 Thanks in advance 提前致谢

I had the same issue. 我遇到过同样的问题。

The issue is that probably your virtual memory size is below the requirements for Android build (16G). 问题是您的虚拟内存大小可能低于Android内部版本(16G)的要求。 I am using virtualbox and had the same issue. 我正在使用virtualbox并遇到相同的问题。

I added memory in virtualbox ,yet I could not reach 16G becuase of my host resources, so I also added swap size: 我在virtualbox中添加了内存,但是由于主机资源的原因我无法达到16G,所以我还增加了交换大小:

sudo dd if=/dev/zero of=/myswapfile bs=1024 count=16777216
sudo mkswap /myswapfile
sudo swapon /myswapfile 

You can also check available memory (before and after doing all these additions) with: 您还可以使用以下方法检查内存(在进行所有这些添加操作之前和之后):

free -k

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM