android编译环境

原文链接:https://source.android.com/source/initializing.html


You will need to use Linux or Mac OS. 

你需要用linux或者苹果系统才可以编译android源码。


For Gingerbread (2.3.x) and newer versions, including the masterbranch, a 64-bit environment is required. Older versions can be compiled on 32-bit systems.

2.3以上的需要64位的环境,之前的可以是32位的。



The master branch of Android in the Android Open Source Project (AOSP) requires Java 7. On Ubuntu, useOpenJDK.


最新的android源码的编译是需要java7环境的。


Java 6: for Gingerbread through KitKat      Android2.3-- 4.4在java6环境编译是可以的
Java 5: for Cupcake through Froyo


Installing required packages (Ubuntu 14.04)

You will need a 64-bit version of Ubuntu. Ubuntu 14.04 is recommended.

$ sudo apt-get install bison g++-multilib git gperf libxml2-utils make zlib1g-dev:i386 zip
ubuntu14.04需要的包


Installing required packages (Ubuntu 12.04)

You may use Ubuntu 12.04 to build older versions of Android. Version 12.04 is not supported on master or recent releases.

$ sudo apt-get install git gnupg flex bison gperf build-essential \
  zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
  libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
  libgl1-mesa-dev g++-multilib mingw32 tofrodos \
  python-markdown libxml2-utils xsltproc zlib1g-dev:i386
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

ubuntu12.04不支持最新的源码的编译


  • Python 2.6 -- 2.7, which you can download from python.org.
  • GNU Make 3.81 -- 3.82, which you can download from gnu.org,
需要用到的软件的版本 Python 2.6 -- 2.7(可以用 python -V查看),GNU Make 3.81 -- 3.82(可以用 make -v查看),Git 1.7 or newer(可以用git --version查看)

















  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值