亚洲欧洲国产欧美一区精品,激情五月亚洲色五月,最新精品国偷自产在线婷婷,欧美婷婷丁香五月天社区

      考試首頁 | 考試用書 | 培訓(xùn)課程 | 模擬考場 | 考試論壇  
        當(dāng)前位置:Linux認(rèn)證 > 綜合輔導(dǎo) > 文章內(nèi)容
        

      Linux教程:32位Ubuntu編譯Android4.0.4問題

      來源:Linux社區(qū) [ 2016年2月1日 ] 【

       問題一:在32位Ubuntu 12.04上編譯Android4.0.4源碼時,出現(xiàn)了關(guān)于emulator的錯誤,關(guān)鍵是其Makefile里的-m64參數(shù),將其用-m32代替即可,錯誤提示如下:

      ERROR: prebuilts/tools/gcc-sdk/../../gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6/bin/x86_64-linux-gcc only run on 64-bit linux

      make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/emulator64-target-arm_intermediates/tcg/tcg.o] Error 1

      涉及需要改的文件如下:

      external/qemu/Makefile.target

      external/qemu/Makefile.common

      問題二:編譯時出現(xiàn)如下提示:

      target Dex: core

      Error occurred during initialization of VM

      Could not reserve enough space for object heap

      Could not create the Java virtual machine.

      make: *** [out/target/common/obj/JAVA_LIBRARIES/core_intermediates/noproguard.classes-with-local.dex] Error 1

      查找build/core/definitions.mk文件發(fā)現(xiàn)如下內(nèi)容:

      #TODO: use a smaller -Xmx value for most libraries;

      #      only core.jar and framework.jar need a heap this big.

      # Avoid the memory arguments on Windows, dx fails to load for some reason with them.

      define transform-classes.jar-to-dex

      @echo "target Dex: $(PRIVATE_MODULE)"

      @mkdir -p $(dir $@)

      $(hide) $(DX) \

      $(if $(findstring windows,$(HOST_OS)),,-JXms16M -JXmx2048M) \

      --dex --output=$@ \

      $(incremental_dex) \

      $(if $(NO_OPTIMIZE_DX), \

      --no-optimize) \

      $(if $(GENERATE_DEX_DEBUG), \

      --debug --verbose \

      --dump-to=$(@:.dex=.lst) \

      --dump-width=1000) \

      $(PRIVATE_DX_FLAGS) \

      $<

      endef

      由于我的電腦只有2GB的內(nèi)容,那么上面的2048M肯定滿足不了,因為linux分配時還需分配給內(nèi)核內(nèi)存,故將該參數(shù)調(diào)小為1024M。

      繼續(xù)編譯還會出現(xiàn)一些關(guān)于emulator的錯誤,而查閱了google官方資料,說是要在64bit系統(tǒng)上編譯,換成64位的后,沒出現(xiàn)什么錯誤,編譯一切正常。

      將考試網(wǎng)添加到收藏夾 | 每次上網(wǎng)自動訪問考試網(wǎng) | 復(fù)制本頁地址,傳給QQ/MSN上的好友 | 申請鏈接 | 意見留言 TOP
      關(guān)于本站  網(wǎng)站聲明  廣告服務(wù)  聯(lián)系方式  站內(nèi)導(dǎo)航  考試論壇
      Copyright © 2007-2013 中華考試網(wǎng)(Examw.com) All Rights Reserved