如何在ubuntu10.04環境下編譯android

來源:互聯網
上載者:User

如何在ubuntu10.04環境下編譯android

android, 編譯

編譯環境:ubuntu10.04

  1.安裝java

  下載jdk-1_5_0_22-linux-i586.bin
  安裝./jdk-1_5_0_22-linux-i586.bin
  會產生jdk1.5.0_22目錄,將此目錄移至/usr/local/下

  2.添加環境變數

  export JAVA_HOME=/usr/local/jdk1.5.0_22
  export JAVA_FONTS=$JAVA_HOME/jre/lib/fonts(不知道幹什麼用的)
  export JRE_HOME=$JAVA_HOME/jre(不知道幹什麼用的)
  export JAVA_PATH=$JAVA_HOME/bin: $JRE_HOME/bin
  export CLASSPATH=.: $JAVA_HOME/lib: $JRE_HOME/lib: $CLASSPATH: $JAVA_HOME/lib/dt.jar: $JAVA_HOME/lib/tools.jar(不知道幹什麼用的)
  export ANDROID_JAVA_HOME=$JAVA_HOME(不知道幹什麼用的)
  export PATH=$JAVA_PATH: $PATH

  3.安裝必要的工具(以Ubuntu為例)

  $sudo apt-get install build-essential(最新)
  $sudo apt-get install zlib1g-dev(最新)
  $sudo apt-get install flex(安裝)
  $sudo apt-get install libncurses-dev(安裝)
  $sudo apt-get install libx11-dev(最新)
  $sudo apt-get install gperf(安裝)
  $sudo apt-get install bison(安裝)

  PS:最新為不需要安裝但是編譯Android所必須的工具

  4.開始編譯

  source build/envsetup.sh
  choosecombo 1 1 6 3
  ============================================
  PLATFORM_VERSION_CODENAME=REL
  PLATFORM_VERSION=1.6
  TARGET_PRODUCT=msm7625_qrd_evt1
  TARGET_BUILD_VARIANT=eng
  TARGET_SIMULATOR=false
  TARGET_BUILD_TYPE=release
  TARGET_ARCH=arm
  HOST_ARCH=x86
  HOST_OS=linux
  HOST_BUILD_TYPE=release
  BUILD_ID=Donut
  ============================================
  make -j4(-j4是指開四個線程,速度會快一些)
  import sha
  unzipping target target-files...
  WARNING: Failed to load max image sizes; will not enforce
  image size limits.
  warning: no radio image in input target_files; not flashing radio
      failed to reconstruct target deflate chunk 2 [(null)]; treating as normal
  Construct patches for 3 chunks...

  patch 0 is 207 bytes (of 1904650)
  patch 1 is 218299 bytes (of 159983)
  patch 2 is 151 bytes (of 1799)
  chunk 0: normal ( 0, 1904650) 207
  chunk 1: deflate ( 1904650, 415279) 218299 (null)
  chunk 2: normal ( 2319929, 455) 151
  done.

make kernelconfig
  出現以上,編譯成功!~

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.