ubuntu14.10上编译Android5.0.2源码

2015年04月14日 Android 9条评论 阅读23584次

ubuntu14.10上编译Android5.0.2源码

前面一篇文章说到了ubuntu14.10上Android5.0.2源码下载的具体步骤,这篇文章说的是ubuntu14.10上编译Android5.0.2源码的那些事。

1.先安装jdk

这里我使用的是openjdk,网上很多人关于jdk到底使用jdk5、jdk6、jdk7还是openjdk一直在争论不休,我选择的是openjdk7,最终证明是可以编译通过的。

sudo apt-get install openjdk-7-jdk

安装好后,设置环境变量:

sudo gedit/etc/profile

 文件末尾加上

 JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/  

 PATH=$PATH:$HOME/bin:$JAVA_HOME/bin

 export JAVA_HOME  

 export PATH

2.安装ccache

 sudo apt-get install ccache

 source ~/.bashrc

3.安装其他依赖的软件

勿必提前安装好,否则编译时出错,会浪费N多时间。

sudo apt-get install git-core

sudo apt-get install git

sudo apt-get install gnupg

sudo apt-get install flex

sudo apt-get install bison

sudo apt-get install gperf

sudo apt-get install build-essential

sudo apt-get install zip

sudo apt-get install curl

sudo apt-get install libc6-dev

sudo apt-get install libncurses5-dev:i386

sudo apt-get install x11proto-core-dev

sudo apt-get install libx11-dev:i386

sudo apt-get install libreadline6-dev:i386

sudo apt-get install libgl1-mesa-dev

sudo apt-get install g++-multilib

sudo apt-get install mingw32

sudo apt-get install tofrodos

sudo apt-get install python-markdown

sudo apt-get install libxml2-utils

sudo apt-get install xsltproc

sudo apt-get install zlib1g-dev:i386

sudo apt-get install dpkg-dev

4.下载其他硬件驱动

到这里,依赖软件基本完成,剩下的就根据自己的需求,下载其他硬件驱动了,我是用编译Nexus6的系统image镜像,所以还需要下载Nexus6的硬件驱动,详细可参照这篇文章。

http://jileniao.net/post-154.html

5.进入到源码目录

  cd android  

  prebuilts/misc/linux-x86/ccache/ccache -M 50G

6.加载环境变量

. build/envsetup.sh

7.选择lunch选项

 lunch

根据测试机器Nexus6,也就是shamu,所以我选择的是21

8.开始编译

make

最终编译完成,我耗时11小时48分钟。

Image

host C++: liblatinime_host_static_for_unittests_32 <= packages/inputmethods/LatinIME/native/jni/src/suggest/policyimpl/dictionary/structure/backward/v402/content/shortcut_dict_content.cpp

host C++: liblatinime_host_static_for_unittests_32 <= packages/inputmethods/LatinIME/native/jni/src/suggest/policyimpl/dictionary/structure/backward/v402/content/sparse_table_dict_content.cpp

host C++: liblatinime_host_static_for_unittests_32 <= packages/inputmethods/LatinIME/native/jni/src/suggest/policyimpl/dictionary/structure/backward/v402/content/terminal_position_lookup_table.cpp

host C++: liblatinime_host_static_for_unittests_32 <= packages/inputmethods/LatinIME/native/jni/src/suggest/policyimpl/dictionary/structure/backward/v402/bigram/ver4_bigram_list_policy.cpp

host StaticLib: liblatinime_host_static_for_unittests_32 (out/host/linux-x86/obj32/STATIC_LIBRARIES/liblatinime_host_static_for_unittests_intermediates/liblatinime_host_static_for_unittests.a)

Export includes file: packages/inputmethods/LatinIME/native/jni/HostUnitTests.mk -- out/host/linux-x86/obj32/EXECUTABLES/liblatinime_host_unittests_intermediates/export_includes

host Executable: liblatinime_host_unittests (out/host/linux-x86/obj32/EXECUTABLES/liblatinime_host_unittests_intermediates/liblatinime_host_unittests)

#### make completed successfully (11:48:27 (hh:mm:ss)) ####


编译中我遇到了编译到libwebviewchromium.so时停止很长时间最后发生错误的问题,解决方法请参照下面这篇文章。

http://jileniao.net/ubunt-add-swap-to-build-libwebviewchromium.html


至此,文末。。。。

分享本文至:

WRITTEN BY

avatar
看了本文是不是觉得很赞,那就赶紧点击下面按钮分享给身边的朋友吧!

9 条评论

  1. avatar billingaco

    <a href="http://www.mauradutra.com/ralph-lauren-big-pony-polo-shirts-quality-menu-poloa">ralph lauren big pony polo shirts quality menu</a> <a href="http://www.lucagerini.com/nike-air-max-lunar1-sko-hvid-chilling-r%C3%B8d-scarpek">nike air max lunar1 sko hvid chilling r酶d</a> <a href="http://www.daphaltd.com/vestido-de-flores-las-compras-en-l%C3%ADnea-malasia-dresse">vestido de flores las compras en l铆nea malasia</a> <a href="http://www.cagdasair.com/nike-lunarlaunch-midnight-armada-footi">nike lunarlaunch midnight armada</a> <a href="http://www.gaellebodyart.com/jordan-1-flight-grau-and-lila-butyg">jordan 1 flight grau and lila</a> <a href="http://www.revisionbacs.com/parajumpers-long-bear-jacket-grey-parajumpersb">parajumpers long bear jacket grey</a>
    billingaco http://www.billingaco.com/

  2. avatar texasjudaica

    <a href="http://www.scrgruppen.com/naranja-polo-sweater-poloa">naranja polo sweater</a> <a href="http://www.jklindfors.com/nike-lebron-13-gs-wolf-gris-print-scarpek">nike lebron 13 gs wolf gris print</a> <a href="http://www.lorenaflowers.com/blumen-kleider-nyc-dresse">blumen kleider nyc</a> <a href="http://www.suppersu.com/air-jordan-melo-m11-grau-orange-footi">air jordan melo m11 grau orange</a> <a href="http://www.riverfresno.com/zx-850-gr%C3%BCn-butyg">zx 850 gr眉n</a> <a href="http://www.blecamerica.com/parajumpers-coat-xs-express-parajumpersb">parajumpers coat xs express</a>
    texasjudaica http://www.texasjudaica.com/

  3. avatar finterz

    <a href="http://www.docelarsjc.com/lipsy-white-floral-bodycon-dress-dressh">lipsy white floral bodycon dress</a> <a href="http://www.olneyagroup.com/nobis-merideth-coat-girl-nobisb">nobis merideth coat girl</a> <a href="http://www.sftfinance.com/mackage-bag-zara-mackagec">mackage bag zara</a> <a href="http://www.cheljm.com/tory-burch-boots-size-5-toryburchr">tory burch boots size 5</a> <a href="http://www.foolheartedly.com/adidas-ultra-boost-v3-triple-noir-butye">adidas ultra boost v3 triple noir</a> <a href="http://www.paulawooley.com/nike-air-max-90-khaki-gr%C3%B8n-obuvf">nike air max 90 khaki gr酶n</a>
    finterz http://www.finterz.com/

  4. avatar brbuyeragent

    <a href="http://www.aouladmhand.com/air-jordan-9-noir-argent-obuve">air jordan 9 noir argent</a> <a href="http://www.chipchak.com/burberry-scarf-damage-quantity-scarfb">burberry scarf damage quantity</a> <a href="http://www.brooklyngay.com/polo-ralph-lauren-plaid-hoodie-red-poloa">polo ralph lauren plaid hoodie red</a> <a href="http://www.royphelps.com/nike-kd-8-p%C3%BArpura-reign-obuvc">nike kd 8 p煤rpura reign</a> <a href="http://www.justwhatilove.com/parajumpers-right-hand-jacket-mens-black-parajumpersf">parajumpers right hand jacket mens black</a> <a href="http://www.incaradio.com/ray-ban-clubmaster-womens-polarized-sunglassesr">ray ban clubmaster womens polarized</a>
    brbuyeragent http://www.brbuyeragent.com/

  5. avatar associazioneagape

    <a href="http://www.airdirectairways.net/nike-air-max-95-invigor-print-verde-azul-chaussuresd">nike air max 95 invigor print verde azul</a> <a href="http://www.allinforchrist.net/air-jordan-6-17-23-sort-varsity-r%C3%B8d-cem%C3%A6ndt-gr%C3%A5-kit-obuve">air jordan 6 17 23 sort varsity r酶d cem忙ndt gr氓 kit</a> <a href="http://www.allproinspections.net/adidas-neo-rose-vert-kurpesd">adidas neo rose vert</a> <a href="http://www.americanparkinsonla.net/nike-air-max-zero-rouge-stardust-fuse-schuhec">nike air max zero rouge stardust fuse</a> <a href="http://www.amicsdelball.net/nike-air-max-90-sneakerboot-silber-blau-butyg">nike air max 90 sneakerboot silber blau</a> <a href="http://www.amishcraftedgazebos.net/nike-air-zoom-structure-18-blanco-rosado-scarped">nike air zoom structure 18 blanco rosado</a>
    associazioneagape http://www.associazioneagape.net/

  6. avatar fortknoxjewelers

    <a href="http://www.onewebsql.net/kvinners-nike-air-max-zero-gull-rosa-schuheb">kvinners nike air max zero gull rosa</a> <a href="http://www.onlinne.net/nike-lebron-14-gris-rouge-butyc">nike lebron 14 gris rouge</a> <a href="http://www.onpointsports.net/adidas-neo-mesh-hvit-sneaker-outfits-obuvf">adidas neo mesh hvit sneaker outfits</a> <a href="http://www.oqibo.net/nike-free-run-4.0-r%C3%B8d-svart-tips-obuvf">nike free run 4.0 r酶d svart tips</a> <a href="http://www.ourjourneychurch.net/air-jordan-retro-3-marron-noir-kurpese">air jordan retro 3 marron noir</a> <a href="http://www.ouverturefacile.net/nike-free-flyknit-3.0-femminile-cielo-blu-viola-schuhee">nike free flyknit 3.0 femminile cielo blu viola</a>
    fortknoxjewelers http://www.fortknoxjewelers.net/

  7. avatar sadnauka

    <a href="http://www.clixorads.com/asics-gel-lyte-5-dark-blau-zone-scarpee">asics gel lyte 5 dark blau zone</a> <a href="http://www.officelucust.com/nike-internationalist-hvit-metallic-s%C3%B8lv-runningg">nike internationalist hvit metallic s酶lv</a> <a href="http://www.ibigwig.com/air-jordan-retro-9-schwarz-gold-schuhei">air jordan retro 9 schwarz gold</a> <a href="http://www.jaypelle.com/pittsburgh-penguins-new-era-snapback-hath">pittsburgh penguins new era snapback</a> <a href="http://www.sblpodcast.com/air-jordan-retro-5-royal-blu-maschiota-verde-trainersce">air jordan retro 5 royal blu maschiota verde</a> <a href="http://www.prmadvantage.com/adidas-protator-lz-trx-fg-2014-schuhek">adidas protator lz trx fg 2014</a>
    sadnauka http://www.sadnauka.com/

  8. avatar freerivalcasinos

    <a href="http://www.sundialproductions.net/nike-air-max-2015-femminile-rosso-argento-chaussuresa">nike air max 2015 femminile rosso argento</a> <a href="http://www.survivewatercrisis.net/nike-zoom-winflo-3-grau-laufen-schuhe-online-obuva">nike zoom winflo 3 grau laufen schuhe online</a> <a href="http://www.szczybelski.net/nike-free-hyperfeel-femminile-in-esecuzione-scarpe-butyc">nike free hyperfeel femminile in esecuzione scarpe</a> <a href="http://www.tammyjdalton.net/bianca-and-grigio-jordan-8-scarpeb">bianca and grigio jordan 8</a> <a href="http://www.tastingtheacorn.net/nike-free-5.0-femminile-scarpe-pelle-nero-bianca-kurpesf">nike free 5.0 femminile scarpe pelle nero bianca</a> <a href="http://www.technologyhandyman.net/asics-l%C3%B8ping-sko-oransje-scarpea">asics l酶ping sko oransje</a>
    [url=http://www.freerivalcasinos.net/]freerivalcasinos[/url]

  9. avatar beachtimenow

    <a href="http://www.iofficeadmin.com/gold-hermes-belt-hermesr">gold hermes belt</a> <a href="http://www.scarystate.com/nike-air-force-1-puerto-rico-sko-shoesv">nike air force 1 puerto rico sko</a> <a href="http://www.emtekmakina.com/coach-tote-ipad-pen-coache">coach tote ipad pen</a> <a href="http://www.solidgoldpay.com/bon-march%C3%A9-adidas-damian-lillard-hommes-bleu-shoesa">bon march茅 adidas damian lillard hommes bleu</a> <a href="http://www.sobresazucar.com/nike-air-jordan-8-aqua-skos">nike air jordan 8 aqua</a> <a href="http://www.zarabahmani.com/ferragamo-logo-belt-beltr">ferragamo logo belt</a>
    beachtimenow http://www.beachtimenow.com/

欢迎留言




用户登录

sitemap