我试图在ubuntu 15.10中构建android源代码,但是我收到了一个错误.现在我希望你的帮助来构建androID源代码.
including ./tools/external/fat32lib/AndroID.mk ...Starting build with ninjaninja: Entering directory `.'[ 0% 1/21542] Ensure Jack server is installed and startedJack server already installed in "/home/smile/.jack-server"Server is already running[ 0% 2/21542] Building with Jack: out/target/common/obj/JAVA_liBRARIES/core-all_intermediates/with-local/classes.dexFailed: /bin/bash out/target/common/obj/JAVA_liBRARIES/core-all_intermediates/with-local/classes.dex.rspJava heap spaceTry increasing heap size with java option '-Xmx<size>'Warning: This may have produced partial or corrupted output.ninja: build stopped: subcommand Failed.build/core/ninja.mk:146: recipe for target 'ninja_wrapper' Failedmake: *** [ninja_wrapper] Error 1#### make Failed to build some targets (08:25 (mm:ss)) ####
然后我运行“$java -Xmx2048m”命令,我得到一些代码:
smile@smile:~/AndroID$java -Xmx2048mUsage: java [-options] class [args...] (to execute a class) or java [-options] -jar jarfile [args...] (to execute a jar file)where options include: -d32 use a 32-bit data model if available -d64 use a 64-bit data model if available -server to select the "server" VM -zero to select the "zero" VM -jamvm to select the "jamvm" VM -avian to select the "avian" VM -dcevm to select the "dcevm" VM The default VM is server. -cp <class search path of directorIEs and zip/jar files> -classpath <class search path of directorIEs and zip/jar files> A : separated List of directorIEs, JAR archives, and ZIP archives to search for class files. -D<name>=<value> set a sy@R_419_6563@ property -verbose:[class|gc|jni] enable verbose output -version print product version and exit -version:<value> require the specifIEd version to run -showversion print product version and continue -jre-restrict-search | -no-jre-restrict-search include/exclude user private JREs in the version search -? -help print this help message -X print help on non-standard options -ea[:<packagename>...|:<classname>] -enableassertions[:<packagename>...|:<classname>] enable assertions with specifIEd granularity -da[:<packagename>...|:<classname>] -disableassertions[:<packagename>...|:<classname>] disable assertions with specifIEd granularity -esa | -enablesy@R_419_6563@assertions enable sy@R_419_6563@ assertions -dsa | -disablesy@R_419_6563@assertions disable sy@R_419_6563@ assertions -agentlib:<libname>[=<options>] load native agent library <libname>, e.g. -agentlib:hprof see also, -agentlib:jDWp=help and -agentlib:hprof=help -agentpath:<pathname>[=<options>] load native agent library by full pathname -javaagent:<jarpath>[=<options>] load Java programming language agent, see java.lang.instrument -splash:<imagepath> show splash screen with specifIEd imageSee http://www.oracle.com/technetwork/java/javase/documentation/index.HTML for more details.
谁能帮我如何增加堆大小?
你的帮助会非常适合我
提前致谢.
smile@smile:~/AndroID$java -versionjava version "1.7.0_91"OpenJDK Runtime Environment (IcedTea 2.6.3) (7u91-2.6.3-0ubuntu0.15.10.1)OpenJDK 64-Bit Server VM (build 24.91-b01, mixed mode)
解决方法:
我遇到了同样的问题.
问题是运行插孔的虚拟机没有足够的内存.
您可以尝试编辑jvm命令:
JACK_VM_COMMAND=${JACK_VM_COMMAND:="java -Xmx4096m"}
或减少并行插孔编号的数量
SERVER_NB_COMPILE=2
在〜/ .jack文件中.
有关详细信息,请阅读jack documentation.
编辑:
更改.jack文件对我不起作用.
在深入挖掘后,我发现jack服务器是以/ host / linux-x86 / bin / jack-admin脚本启动的,它的参数可以通过JACK_SERVER_VM_ARGUMENTS环境变量传递.
所以我的解决方案是在构建aosp之前设置它并重新启动jack服务器:
export JACK_SERVER_VM_ARGUMENTS="-Dfile.enCoding=UTF-8 -XX:+TIEredCompilation -Xmx4096m"out/host/linux-x86/bin/jack-admin kill-serverout/host/linux-x86/bin/jack-admin start-server
总结 以上是内存溢出为你收集整理的java – 在Ubuntu 15.10上构建android源代码时增加堆大小全部内容,希望文章能够帮你解决java – 在Ubuntu 15.10上构建android源代码时增加堆大小所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)